File tree 1 file changed +20
-12
lines changed 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -264,24 +264,32 @@ class ChooseAccountPage extends StatelessWidget {
264
264
}
265
265
}
266
266
267
- enum ChooseAccountPageOverflowMenuItem { aboutZulip }
268
-
269
267
class ChooseAccountPageOverflowButton extends StatelessWidget {
270
268
const ChooseAccountPageOverflowButton ({super .key});
271
269
272
270
@override
273
271
Widget build (BuildContext context) {
274
- return PopupMenuButton <ChooseAccountPageOverflowMenuItem >(
275
- itemBuilder: (BuildContext context) => const [
276
- PopupMenuItem (
277
- value: ChooseAccountPageOverflowMenuItem .aboutZulip,
278
- child: Text ('About Zulip' )),
279
- ],
280
- onSelected: (item) {
281
- switch (item) {
282
- case ChooseAccountPageOverflowMenuItem .aboutZulip:
272
+ final designVariables = DesignVariables .of (context);
273
+ final materialLocalizations = MaterialLocalizations .of (context);
274
+ return MenuAnchor (
275
+ menuChildren: [
276
+ MenuItemButton (
277
+ onPressed: () {
283
278
Navigator .push (context, AboutZulipPage .buildRoute (context));
284
- }
279
+ },
280
+ child: const Text ('About Zulip' )), // TODO(i18n)
281
+ ],
282
+ builder: (BuildContext context, MenuController controller, Widget ? child) {
283
+ return IconButton (
284
+ tooltip: materialLocalizations.showMenuTooltip, // "Show menu"
285
+ onPressed: () {
286
+ if (controller.isOpen) {
287
+ controller.close ();
288
+ } else {
289
+ controller.open ();
290
+ }
291
+ },
292
+ icon: Icon (Icons .adaptive.more, color: designVariables.icon));
285
293
});
286
294
}
287
295
}
You can’t perform that action at this time.
0 commit comments