@@ -27,56 +27,54 @@ import 'theme.dart';
27
27
28
28
/// Message-list styles that differ between light and dark themes.
29
29
class MessageListTheme extends ThemeExtension <MessageListTheme > {
30
- MessageListTheme .light () :
31
- this ._(
32
- dateSeparator: Colors .black,
33
- dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
34
- dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
35
- messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
36
- recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
37
- senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
38
- senderName: const HSLColor .fromAHSL (1 , 0 , 0 , 0.2 ).toColor (),
39
- streamMessageBgDefault: Colors .white,
40
- streamRecipientHeaderChevronRight: Colors .black.withValues (alpha: 0.3 ),
41
-
42
- // From the Figma mockup at:
43
- // https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=132-9684
44
- // See discussion about design at:
45
- // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20unread.20marker/near/1658008
46
- // (Web uses a left-to-right gradient from hsl(217deg 64% 59%) to transparent,
47
- // in both light and dark theme.)
48
- unreadMarker: const HSLColor .fromAHSL (1 , 227 , 0.78 , 0.59 ).toColor (),
49
-
50
- unreadMarkerGap: Colors .white.withValues (alpha: 0.6 ),
51
-
52
- // TODO(design) this seems ad-hoc; is there a better color?
53
- unsubscribedStreamRecipientHeaderBg: const Color (0xfff5f5f5 ),
54
- );
55
-
56
- MessageListTheme .dark () :
57
- this ._(
58
- dateSeparator: Colors .white,
59
- dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
60
- dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.15 , 0.2 ).toColor (),
61
- messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.85 ).toColor (),
62
- recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
63
- senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
64
- senderName: const HSLColor .fromAHSL (0.85 , 0 , 0 , 1 ).toColor (),
65
- streamMessageBgDefault: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
66
- streamRecipientHeaderChevronRight: Colors .white.withValues (alpha: 0.3 ),
67
-
68
- // 0.75 opacity from here:
69
- // https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=807-33998&m=dev
70
- // Discussion, some weeks after the discussion linked on the light variant:
71
- // https://github.com/zulip/zulip-flutter/pull/317#issuecomment-1784311663
72
- // where Vlad includes screenshots that look like they're from there.
73
- unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
74
-
75
- unreadMarkerGap: Colors .transparent,
76
-
77
- // TODO(design) this is ad-hoc and untested; is there a better color?
78
- unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
79
- );
30
+ static final light = MessageListTheme ._(
31
+ dateSeparator: Colors .black,
32
+ dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
33
+ dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
34
+ messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
35
+ recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
36
+ senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
37
+ senderName: const HSLColor .fromAHSL (1 , 0 , 0 , 0.2 ).toColor (),
38
+ streamMessageBgDefault: Colors .white,
39
+ streamRecipientHeaderChevronRight: Colors .black.withValues (alpha: 0.3 ),
40
+
41
+ // From the Figma mockup at:
42
+ // https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=132-9684
43
+ // See discussion about design at:
44
+ // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20unread.20marker/near/1658008
45
+ // (Web uses a left-to-right gradient from hsl(217deg 64% 59%) to transparent,
46
+ // in both light and dark theme.)
47
+ unreadMarker: const HSLColor .fromAHSL (1 , 227 , 0.78 , 0.59 ).toColor (),
48
+
49
+ unreadMarkerGap: Colors .white.withValues (alpha: 0.6 ),
50
+
51
+ // TODO(design) this seems ad-hoc; is there a better color?
52
+ unsubscribedStreamRecipientHeaderBg: const Color (0xfff5f5f5 ),
53
+ );
54
+
55
+ static final dark = MessageListTheme ._(
56
+ dateSeparator: Colors .white,
57
+ dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
58
+ dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.15 , 0.2 ).toColor (),
59
+ messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.85 ).toColor (),
60
+ recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
61
+ senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
62
+ senderName: const HSLColor .fromAHSL (0.85 , 0 , 0 , 1 ).toColor (),
63
+ streamMessageBgDefault: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
64
+ streamRecipientHeaderChevronRight: Colors .white.withValues (alpha: 0.3 ),
65
+
66
+ // 0.75 opacity from here:
67
+ // https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=807-33998&m=dev
68
+ // Discussion, some weeks after the discussion linked on the light variant:
69
+ // https://github.com/zulip/zulip-flutter/pull/317#issuecomment-1784311663
70
+ // where Vlad includes screenshots that look like they're from there.
71
+ unreadMarker: const HSLColor .fromAHSL (0.75 , 227 , 0.78 , 0.59 ).toColor (),
72
+
73
+ unreadMarkerGap: Colors .transparent,
74
+
75
+ // TODO(design) this is ad-hoc and untested; is there a better color?
76
+ unsubscribedStreamRecipientHeaderBg: const Color (0xff0a0a0a ),
77
+ );
80
78
81
79
MessageListTheme ._({
82
80
required this .dateSeparator,
0 commit comments