@@ -31,6 +31,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
31
31
dateSeparator: Colors .black,
32
32
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 0.15 ).toColor (),
33
33
dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor (),
34
+ messageTimestamp: const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor (),
34
35
recipientHeaderText: const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor (),
35
36
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.08 , 0.65 ).toColor (),
36
37
senderName: const HSLColor .fromAHSL (1 , 0 , 0 , 0.2 ).toColor (),
@@ -56,6 +57,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
56
57
dateSeparator: Colors .white,
57
58
dateSeparatorText: const HSLColor .fromAHSL (0.75 , 0 , 0 , 1 ).toColor (),
58
59
dmRecipientHeaderBg: const HSLColor .fromAHSL (1 , 46 , 0.15 , 0.2 ).toColor (),
60
+ messageTimestamp: const HSLColor .fromAHSL (0.6 , 0 , 0 , 1 ).toColor (),
59
61
recipientHeaderText: const HSLColor .fromAHSL (0.8 , 0 , 0 , 1 ).toColor (),
60
62
senderBotIcon: const HSLColor .fromAHSL (1 , 180 , 0.05 , 0.5 ).toColor (),
61
63
senderName: const HSLColor .fromAHSL (0.85 , 0 , 0 , 1 ).toColor (),
@@ -79,6 +81,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
79
81
required this .dateSeparator,
80
82
required this .dateSeparatorText,
81
83
required this .dmRecipientHeaderBg,
84
+ required this .messageTimestamp,
82
85
required this .recipientHeaderText,
83
86
required this .senderBotIcon,
84
87
required this .senderName,
@@ -102,6 +105,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
102
105
final Color dateSeparator;
103
106
final Color dateSeparatorText;
104
107
final Color dmRecipientHeaderBg;
108
+ final Color messageTimestamp;
105
109
final Color recipientHeaderText;
106
110
final Color senderBotIcon;
107
111
final Color senderName;
@@ -116,6 +120,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
116
120
Color ? dateSeparator,
117
121
Color ? dateSeparatorText,
118
122
Color ? dmRecipientHeaderBg,
123
+ Color ? messageTimestamp,
119
124
Color ? recipientHeaderText,
120
125
Color ? senderBotIcon,
121
126
Color ? senderName,
@@ -129,6 +134,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
129
134
dateSeparator: dateSeparator ?? this .dateSeparator,
130
135
dateSeparatorText: dateSeparatorText ?? this .dateSeparatorText,
131
136
dmRecipientHeaderBg: dmRecipientHeaderBg ?? this .dmRecipientHeaderBg,
137
+ messageTimestamp: messageTimestamp ?? this .messageTimestamp,
132
138
recipientHeaderText: recipientHeaderText ?? this .recipientHeaderText,
133
139
senderBotIcon: senderBotIcon ?? this .senderBotIcon,
134
140
senderName: senderName ?? this .senderName,
@@ -149,6 +155,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
149
155
dateSeparator: Color .lerp (dateSeparator, other.dateSeparator, t)! ,
150
156
dateSeparatorText: Color .lerp (dateSeparatorText, other.dateSeparatorText, t)! ,
151
157
dmRecipientHeaderBg: Color .lerp (streamMessageBgDefault, other.dmRecipientHeaderBg, t)! ,
158
+ messageTimestamp: Color .lerp (messageTimestamp, other.messageTimestamp, t)! ,
152
159
recipientHeaderText: Color .lerp (recipientHeaderText, other.recipientHeaderText, t)! ,
153
160
senderBotIcon: Color .lerp (senderBotIcon, other.senderBotIcon, t)! ,
154
161
senderName: Color .lerp (senderName, other.senderName, t)! ,
@@ -1148,7 +1155,7 @@ class MessageWithPossibleSender extends StatelessWidget {
1148
1155
const SizedBox (width: 4 ),
1149
1156
Text (time,
1150
1157
style: TextStyle (
1151
- color: _kMessageTimestampColor ,
1158
+ color: messageListTheme.messageTimestamp ,
1152
1159
fontFamily: 'Source Sans 3' ,
1153
1160
fontSize: 16 ,
1154
1161
height: (18 / 16 ),
@@ -1187,5 +1194,3 @@ class MessageWithPossibleSender extends StatelessWidget {
1187
1194
1188
1195
// TODO web seems to ignore locale in formatting time, but we could do better
1189
1196
final _kMessageTimestampFormat = DateFormat ('h:mm aa' , 'en_US' );
1190
-
1191
- final _kMessageTimestampColor = const HSLColor .fromAHSL (0.8 , 0 , 0 , 0.2 ).toColor ();
0 commit comments