mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:48:41 +00:00
fix #261
This commit is contained in:
parent
57058b3b13
commit
cdb89a139f
1 changed files with 6 additions and 3 deletions
|
|
@ -12,20 +12,23 @@ class ChatDateChip extends StatelessWidget {
|
||||||
final formattedDate = item.isTime
|
final formattedDate = item.isTime
|
||||||
? DateFormat.Hm(Localizations.localeOf(context).toLanguageTag())
|
? DateFormat.Hm(Localizations.localeOf(context).toLanguageTag())
|
||||||
.format(item.time!)
|
.format(item.time!)
|
||||||
: '${DateFormat.Hm(Localizations.localeOf(context).toLanguageTag()).format(item.date!)} ${DateFormat.yMd(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}';
|
: '${DateFormat.Hm(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}\n${DateFormat.yMd(Localizations.localeOf(context).toLanguageTag()).format(item.date!)}';
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.black.withAlpha(40),
|
color: isDarkMode(context)
|
||||||
|
? const Color.fromARGB(255, 38, 38, 38)
|
||||||
|
: Colors.black.withAlpha(40),
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
|
||||||
child: Text(
|
child: Text(
|
||||||
formattedDate,
|
formattedDate,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
color: isDarkMode(context) ? Colors.white : Colors.black,
|
color: isDarkMode(context) ? Colors.white : Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue