Skip to content

Commit cdb89a1

Browse files
committed
fix #261
1 parent 57058b3 commit cdb89a1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/src/views/chats/chat_messages_components/chat_date_chip.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,23 @@ class ChatDateChip extends StatelessWidget {
1212
final formattedDate = item.isTime
1313
? DateFormat.Hm(Localizations.localeOf(context).toLanguageTag())
1414
.format(item.time!)
15-
: '${DateFormat.Hm(Localizations.localeOf(context).toLanguageTag()).format(item.date!)} ${DateFormat.yMd(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}';
15+
: '${DateFormat.Hm(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}\n${DateFormat.yMd(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}';
1616

1717
return Center(
1818
child: Container(
1919
decoration: BoxDecoration(
20-
color: Colors.black.withAlpha(40),
20+
color: isDarkMode(context)
21+
? const Color.fromARGB(255, 38, 38, 38)
22+
: Colors.black.withAlpha(40),
2123
borderRadius: BorderRadius.circular(8),
2224
),
2325
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
2426
child: Text(
2527
formattedDate,
28+
textAlign: TextAlign.center,
2629
style: TextStyle(
2730
fontSize: 10,
28-
color: isDarkMode(context) ? Colors.white : Colors.black,
31+
color: isDarkMode(context) ? Colors.white : Colors.grey,
2932
),
3033
),
3134
),

0 commit comments

Comments
 (0)