@@ -229,6 +229,7 @@ class ChooseAccountPage extends StatelessWidget {
229
229
required Widget title,
230
230
Widget ? subtitle,
231
231
}) {
232
+ final colorScheme = ColorScheme .of (context);
232
233
final designVariables = DesignVariables .of (context);
233
234
final zulipLocalizations = ZulipLocalizations .of (context);
234
235
final materialLocalizations = MaterialLocalizations .of (context);
@@ -237,6 +238,8 @@ class ChooseAccountPage extends StatelessWidget {
237
238
child: ListTile (
238
239
title: title,
239
240
subtitle: subtitle,
241
+ tileColor: colorScheme.secondaryContainer,
242
+ textColor: colorScheme.onSecondaryContainer,
240
243
trailing: MenuAnchor (
241
244
menuChildren: [
242
245
MenuItemButton (
@@ -274,36 +277,40 @@ class ChooseAccountPage extends StatelessWidget {
274
277
275
278
@override
276
279
Widget build (BuildContext context) {
280
+ final colorScheme = ColorScheme .of (context);
277
281
final zulipLocalizations = ZulipLocalizations .of (context);
278
282
assert (! PerAccountStoreWidget .debugExistsOf (context));
279
283
final globalStore = GlobalStoreWidget .of (context);
280
- return Scaffold (
281
- appBar: AppBar (
282
- titleSpacing: 16 ,
283
- title: Text (zulipLocalizations.chooseAccountPageTitle),
284
- actions: const [ChooseAccountPageOverflowButton ()]),
285
- body: SafeArea (
286
- minimum: const EdgeInsets .fromLTRB (8 , 0 , 8 , 8 ),
287
- child: Center (
288
- child: ConstrainedBox (
289
- constraints: const BoxConstraints (maxWidth: 400 ),
290
- child: Column (mainAxisSize: MainAxisSize .min, children: [
291
- Flexible (child: SingleChildScrollView (
292
- padding: const EdgeInsets .only (top: 8 ),
293
- child: Column (mainAxisSize: MainAxisSize .min, children: [
294
- for (final (: accountId, : account) in globalStore.accountEntries)
295
- _buildAccountItem (context,
296
- accountId: accountId,
297
- title: Text (account.realmUrl.toString ()),
298
- subtitle: Text (account.email)),
299
- ]))),
300
- const SizedBox (height: 12 ),
301
- ElevatedButton (
302
- onPressed: () => Navigator .push (context,
303
- AddAccountPage .buildRoute ()),
304
- child: Text (zulipLocalizations.chooseAccountButtonAddAnAccount)),
305
- ]))),
306
- ));
284
+ return MenuButtonTheme (
285
+ data: MenuButtonThemeData (style: MenuItemButton .styleFrom (
286
+ backgroundColor: colorScheme.secondaryContainer,
287
+ foregroundColor: colorScheme.onSecondaryContainer)),
288
+ child: Scaffold (
289
+ appBar: AppBar (
290
+ titleSpacing: 16 ,
291
+ title: Text (zulipLocalizations.chooseAccountPageTitle),
292
+ actions: const [ChooseAccountPageOverflowButton ()]),
293
+ body: SafeArea (
294
+ minimum: const EdgeInsets .fromLTRB (8 , 0 , 8 , 8 ),
295
+ child: Center (
296
+ child: ConstrainedBox (
297
+ constraints: const BoxConstraints (maxWidth: 400 ),
298
+ child: Column (mainAxisSize: MainAxisSize .min, children: [
299
+ Flexible (child: SingleChildScrollView (
300
+ padding: const EdgeInsets .only (top: 8 ),
301
+ child: Column (mainAxisSize: MainAxisSize .min, children: [
302
+ for (final (: accountId, : account) in globalStore.accountEntries)
303
+ _buildAccountItem (context,
304
+ accountId: accountId,
305
+ title: Text (account.realmUrl.toString ()),
306
+ subtitle: Text (account.email)),
307
+ ]))),
308
+ const SizedBox (height: 12 ),
309
+ ElevatedButton (
310
+ onPressed: () => Navigator .push (context,
311
+ AddAccountPage .buildRoute ()),
312
+ child: Text (zulipLocalizations.chooseAccountButtonAddAnAccount)),
313
+ ]))))));
307
314
}
308
315
}
309
316
0 commit comments