@@ -26,7 +26,7 @@ ThemeData zulipThemeData(BuildContext context) {
26
26
27
27
switch (brightness) {
28
28
case Brightness .light: {
29
- designVariables = DesignVariables .light () ;
29
+ designVariables = DesignVariables .light;
30
30
themeExtensions = [
31
31
ContentTheme .light (context),
32
32
designVariables,
@@ -35,7 +35,7 @@ ThemeData zulipThemeData(BuildContext context) {
35
35
];
36
36
}
37
37
case Brightness .dark: {
38
- designVariables = DesignVariables .dark () ;
38
+ designVariables = DesignVariables .dark;
39
39
themeExtensions = [
40
40
ContentTheme .dark (context),
41
41
designVariables,
@@ -117,8 +117,7 @@ const kZulipBrandColor = Color.fromRGBO(0x64, 0x92, 0xfe, 1);
117
117
/// or
118
118
/// https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=2945-49492&t=MEb4vtp7S26nntxm-0
119
119
class DesignVariables extends ThemeExtension <DesignVariables > {
120
- DesignVariables .light () :
121
- this ._(
120
+ static final light = DesignVariables ._(
122
121
background: const Color (0xffffffff ),
123
122
bannerBgIntDanger: const Color (0xfff2e4e4 ),
124
123
bgBotBar: const Color (0xfff6f6f6 ),
@@ -148,7 +147,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
148
147
bgSearchInput: const Color (0xffe3e3e3 ),
149
148
textMessage: const Color (0xff262626 ),
150
149
channelColorSwatches: ChannelColorSwatches .light,
151
- colorMessageHeaderIconInteractive: Colors .black.withValues (alpha: 0.2 ),
152
150
contextMenuCancelBg: const Color (0xff797986 ).withValues (alpha: 0.15 ),
153
151
contextMenuCancelPressedBg: const Color (0xff797986 ).withValues (alpha: 0.20 ),
154
152
dmHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
@@ -167,8 +165,7 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
167
165
unreadCountBadgeTextForChannel: Colors .black.withValues (alpha: 0.9 ),
168
166
);
169
167
170
- DesignVariables .dark () :
171
- this ._(
168
+ static final dark = DesignVariables ._(
172
169
background: const Color (0xff000000 ),
173
170
bannerBgIntDanger: const Color (0xff461616 ),
174
171
bgBotBar: const Color (0xff222222 ),
@@ -201,7 +198,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
201
198
contextMenuCancelBg: const Color (0xff797986 ).withValues (alpha: 0.15 ), // the same as the light mode in Figma
202
199
contextMenuCancelPressedBg: const Color (0xff797986 ).withValues (alpha: 0.20 ), // the same as the light mode in Figma
203
200
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
204
- colorMessageHeaderIconInteractive: Colors .white.withValues (alpha: 0.2 ),
205
201
dmHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.15 , 0.2 ).toColor (),
206
202
// TODO(design-dark) need proper dark-theme color (this is ad hoc)
207
203
groupDmConversationIcon: Colors .white.withValues (alpha: 0.5 ),
@@ -255,7 +251,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
255
251
required this .bgSearchInput,
256
252
required this .textMessage,
257
253
required this .channelColorSwatches,
258
- required this .colorMessageHeaderIconInteractive,
259
254
required this .contextMenuCancelBg,
260
255
required this .contextMenuCancelPressedBg,
261
256
required this .dmHeaderBg,
@@ -317,7 +312,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
317
312
final ChannelColorSwatches channelColorSwatches;
318
313
319
314
// Not named variables in Figma; taken from older Figma drafts, or elsewhere.
320
- final Color colorMessageHeaderIconInteractive;
321
315
final Color contextMenuCancelBg; // In Figma, but unnamed.
322
316
final Color contextMenuCancelPressedBg; // In Figma, but unnamed.
323
317
final Color dmHeaderBg;
@@ -366,7 +360,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
366
360
Color ? bgSearchInput,
367
361
Color ? textMessage,
368
362
ChannelColorSwatches ? channelColorSwatches,
369
- Color ? colorMessageHeaderIconInteractive,
370
363
Color ? contextMenuCancelBg,
371
364
Color ? contextMenuCancelPressedBg,
372
365
Color ? dmHeaderBg,
@@ -414,7 +407,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
414
407
bgSearchInput: bgSearchInput ?? this .bgSearchInput,
415
408
textMessage: textMessage ?? this .textMessage,
416
409
channelColorSwatches: channelColorSwatches ?? this .channelColorSwatches,
417
- colorMessageHeaderIconInteractive: colorMessageHeaderIconInteractive ?? this .colorMessageHeaderIconInteractive,
418
410
contextMenuCancelBg: contextMenuCancelBg ?? this .contextMenuCancelBg,
419
411
contextMenuCancelPressedBg: contextMenuCancelPressedBg ?? this .contextMenuCancelPressedBg,
420
412
dmHeaderBg: dmHeaderBg ?? this .dmHeaderBg,
@@ -469,7 +461,6 @@ class DesignVariables extends ThemeExtension<DesignVariables> {
469
461
bgSearchInput: Color .lerp (bgSearchInput, other.bgSearchInput, t)! ,
470
462
textMessage: Color .lerp (textMessage, other.textMessage, t)! ,
471
463
channelColorSwatches: ChannelColorSwatches .lerp (channelColorSwatches, other.channelColorSwatches, t),
472
- colorMessageHeaderIconInteractive: Color .lerp (colorMessageHeaderIconInteractive, other.colorMessageHeaderIconInteractive, t)! ,
473
464
contextMenuCancelBg: Color .lerp (contextMenuCancelBg, other.contextMenuCancelBg, t)! ,
474
465
contextMenuCancelPressedBg: Color .lerp (contextMenuCancelPressedBg, other.contextMenuCancelPressedBg, t)! ,
475
466
dmHeaderBg: Color .lerp (dmHeaderBg, other.dmHeaderBg, t)! ,
0 commit comments