11import 'package:flutter/material.dart' ;
22
3+ import 'about_zulip.dart' ;
34import 'compose_box.dart' ;
45import 'login.dart' ;
56import 'message_list.dart' ;
@@ -57,7 +58,9 @@ class ChooseAccountPage extends StatelessWidget {
5758 assert (! PerAccountStoreWidget .debugExistsOf (context));
5859 final globalStore = GlobalStoreWidget .of (context);
5960 return Scaffold (
60- appBar: AppBar (title: const Text ('Choose account' )),
61+ appBar: AppBar (
62+ title: const Text ('Choose account' ),
63+ actions: const [ChooseAccountPageOverflowButton ()]),
6164 body: SafeArea (
6265 minimum: const EdgeInsets .all (8 ),
6366 child: Center (
@@ -79,6 +82,30 @@ class ChooseAccountPage extends StatelessWidget {
7982 }
8083}
8184
85+ enum ChooseAccountPageOverflowMenuItem { aboutZulip }
86+
87+ class ChooseAccountPageOverflowButton extends StatelessWidget {
88+ const ChooseAccountPageOverflowButton ({super .key});
89+
90+ @override
91+ Widget build (BuildContext context) {
92+ final navigator = Navigator .of (context);
93+
94+ return PopupMenuButton <ChooseAccountPageOverflowMenuItem >(
95+ itemBuilder: (BuildContext context) => const [
96+ PopupMenuItem (
97+ value: ChooseAccountPageOverflowMenuItem .aboutZulip,
98+ child: Text ('About Zulip' )),
99+ ],
100+ onSelected: (item) {
101+ switch (item) {
102+ case ChooseAccountPageOverflowMenuItem .aboutZulip:
103+ navigator.push (AboutZulipPage .buildRoute (context));
104+ }
105+ });
106+ }
107+ }
108+
82109class HomePage extends StatelessWidget {
83110 const HomePage ({super .key});
84111
0 commit comments