@@ -24,8 +24,6 @@ class HomePage extends StatelessWidget {
24
24
final store = PerAccountStoreWidget .of (context);
25
25
final zulipLocalizations = ZulipLocalizations .of (context);
26
26
27
- final colorScheme = ColorScheme .of (context);
28
-
29
27
InlineSpan bold (String text) => TextSpan (
30
28
style: const TextStyle ().merge (weightVariableTextStyle (context, wght: 700 )),
31
29
text: text);
@@ -37,61 +35,57 @@ class HomePage extends StatelessWidget {
37
35
38
36
return Scaffold (
39
37
appBar: ZulipAppBar (title: const Text ("Home" )),
40
- body: ElevatedButtonTheme (
41
- data: ElevatedButtonThemeData (style: ButtonStyle (
42
- backgroundColor: WidgetStatePropertyAll (colorScheme.secondaryContainer),
43
- foregroundColor: WidgetStatePropertyAll (colorScheme.onSecondaryContainer))),
44
- child: Center (
45
- child: Column (mainAxisAlignment: MainAxisAlignment .center, children: [
46
- DefaultTextStyle .merge (
47
- textAlign: TextAlign .center,
48
- style: const TextStyle (fontSize: 18 ),
49
- child: Column (children: [
50
- Text .rich (TextSpan (
51
- text: 'Connected to: ' ,
52
- children: [bold (store.realmUrl.toString ())])),
53
- ])),
54
- const SizedBox (height: 16 ),
55
- ElevatedButton (
56
- onPressed: () => Navigator .push (context,
57
- MessageListPage .buildRoute (context: context,
58
- narrow: const CombinedFeedNarrow ())),
59
- child: Text (zulipLocalizations.combinedFeedPageTitle)),
60
- const SizedBox (height: 16 ),
61
- ElevatedButton (
62
- onPressed: () => Navigator .push (context,
63
- MessageListPage .buildRoute (context: context,
64
- narrow: const MentionsNarrow ())),
65
- child: Text (zulipLocalizations.mentionsPageTitle)),
38
+ body: Center (
39
+ child: Column (mainAxisAlignment: MainAxisAlignment .center, children: [
40
+ DefaultTextStyle .merge (
41
+ textAlign: TextAlign .center,
42
+ style: const TextStyle (fontSize: 18 ),
43
+ child: Column (children: [
44
+ Text .rich (TextSpan (
45
+ text: 'Connected to: ' ,
46
+ children: [bold (store.realmUrl.toString ())])),
47
+ ])),
48
+ const SizedBox (height: 16 ),
49
+ ElevatedButton (
50
+ onPressed: () => Navigator .push (context,
51
+ MessageListPage .buildRoute (context: context,
52
+ narrow: const CombinedFeedNarrow ())),
53
+ child: Text (zulipLocalizations.combinedFeedPageTitle)),
54
+ const SizedBox (height: 16 ),
55
+ ElevatedButton (
56
+ onPressed: () => Navigator .push (context,
57
+ MessageListPage .buildRoute (context: context,
58
+ narrow: const MentionsNarrow ())),
59
+ child: Text (zulipLocalizations.mentionsPageTitle)),
60
+ const SizedBox (height: 16 ),
61
+ ElevatedButton (
62
+ onPressed: () => Navigator .push (context,
63
+ MessageListPage .buildRoute (context: context,
64
+ narrow: const StarredMessagesNarrow ())),
65
+ child: Text (zulipLocalizations.starredMessagesPageTitle)),
66
+ const SizedBox (height: 16 ),
67
+ ElevatedButton (
68
+ onPressed: () => Navigator .push (context,
69
+ InboxPage .buildRoute (context: context)),
70
+ child: const Text ("Inbox" )), // TODO(i18n)
71
+ const SizedBox (height: 16 ),
72
+ ElevatedButton (
73
+ onPressed: () => Navigator .push (context,
74
+ SubscriptionListPage .buildRoute (context: context)),
75
+ child: const Text ("Subscribed channels" )),
76
+ const SizedBox (height: 16 ),
77
+ ElevatedButton (
78
+ onPressed: () => Navigator .push (context,
79
+ RecentDmConversationsPage .buildRoute (context: context)),
80
+ child: Text (zulipLocalizations.recentDmConversationsPageTitle)),
81
+ if (testStreamId != null ) ...[
66
82
const SizedBox (height: 16 ),
67
83
ElevatedButton (
68
84
onPressed: () => Navigator .push (context,
69
85
MessageListPage .buildRoute (context: context,
70
- narrow: const StarredMessagesNarrow ())),
71
- child: Text (zulipLocalizations.starredMessagesPageTitle)),
72
- const SizedBox (height: 16 ),
73
- ElevatedButton (
74
- onPressed: () => Navigator .push (context,
75
- InboxPage .buildRoute (context: context)),
76
- child: const Text ("Inbox" )), // TODO(i18n)
77
- const SizedBox (height: 16 ),
78
- ElevatedButton (
79
- onPressed: () => Navigator .push (context,
80
- SubscriptionListPage .buildRoute (context: context)),
81
- child: const Text ("Subscribed channels" )),
82
- const SizedBox (height: 16 ),
83
- ElevatedButton (
84
- onPressed: () => Navigator .push (context,
85
- RecentDmConversationsPage .buildRoute (context: context)),
86
- child: Text (zulipLocalizations.recentDmConversationsPageTitle)),
87
- if (testStreamId != null ) ...[
88
- const SizedBox (height: 16 ),
89
- ElevatedButton (
90
- onPressed: () => Navigator .push (context,
91
- MessageListPage .buildRoute (context: context,
92
- narrow: ChannelNarrow (testStreamId! ))),
93
- child: const Text ("#test here" )), // scaffolding hack, see above
94
- ],
95
- ]))));
86
+ narrow: ChannelNarrow (testStreamId! ))),
87
+ child: const Text ("#test here" )), // scaffolding hack, see above
88
+ ],
89
+ ])));
96
90
}
97
91
}
0 commit comments