@@ -15,7 +15,7 @@ import 'page.dart';
15
15
import 'recent_dm_conversations.dart' ;
16
16
import 'store.dart' ;
17
17
import 'subscription_list.dart' ;
18
- import 'text .dart' ;
18
+ import 'theme .dart' ;
19
19
20
20
class ZulipApp extends StatefulWidget {
21
21
const ZulipApp ({super .key, this .navigatorObservers});
@@ -109,34 +109,6 @@ class _ZulipAppState extends State<ZulipApp> with WidgetsBindingObserver {
109
109
110
110
@override
111
111
Widget build (BuildContext context) {
112
- final theme = ThemeData (
113
- typography: zulipTypography (context),
114
- appBarTheme: const AppBarTheme (
115
- // Set these two fields to prevent a color change in [AppBar]s when
116
- // there is something scrolled under it. If an app bar hasn't been
117
- // given a backgroundColor directly or by theme, it uses
118
- // ColorScheme.surfaceContainer for the scrolled-under state and
119
- // ColorScheme.surface otherwise, and those are different colors.
120
- scrolledUnderElevation: 0 ,
121
- backgroundColor: Color (0xfff5f5f5 ),
122
-
123
- shape: Border (bottom: BorderSide (color: Color (0xffcccccc ))),
124
- ),
125
- // This applies Material 3's color system to produce a palette of
126
- // appropriately matching and contrasting colors for use in a UI.
127
- // The Zulip brand color is a starting point, but doesn't end up as
128
- // one that's directly used. (After all, we didn't design it for that
129
- // purpose; we designed a logo.) See docs:
130
- // https://api.flutter.dev/flutter/material/ColorScheme/ColorScheme.fromSeed.html
131
- // Or try this tool to see the whole palette:
132
- // https://m3.material.io/theme-builder#/custom
133
- colorScheme: ColorScheme .fromSeed (
134
- seedColor: kZulipBrandColor,
135
- ),
136
- scaffoldBackgroundColor: const Color (0xfff6f6f6 ),
137
- tooltipTheme: const TooltipThemeData (preferBelow: false ),
138
- );
139
-
140
112
return GlobalStoreWidget (
141
113
child: Builder (builder: (context) {
142
114
final globalStore = GlobalStoreWidget .of (context);
@@ -146,7 +118,7 @@ class _ZulipAppState extends State<ZulipApp> with WidgetsBindingObserver {
146
118
title: 'Zulip' ,
147
119
localizationsDelegates: ZulipLocalizations .localizationsDelegates,
148
120
supportedLocales: ZulipLocalizations .supportedLocales,
149
- theme: theme ,
121
+ theme: outerThemeData (context) ,
150
122
151
123
navigatorKey: ZulipApp .navigatorKey,
152
124
navigatorObservers: widget.navigatorObservers ?? const [],
@@ -181,12 +153,6 @@ class _ZulipAppState extends State<ZulipApp> with WidgetsBindingObserver {
181
153
}
182
154
}
183
155
184
- /// The Zulip "brand color", a purplish blue.
185
- ///
186
- /// This is chosen as the sRGB midpoint of the Zulip logo's gradient.
187
- // As computed by Anders: https://github.com/zulip/zulip-mobile/pull/4467
188
- const kZulipBrandColor = Color .fromRGBO (0x64 , 0x92 , 0xfe , 1 );
189
-
190
156
class ChooseAccountPage extends StatelessWidget {
191
157
const ChooseAccountPage ({super .key});
192
158
0 commit comments