Add DateTime extension
This commit is contained in:
parent
a08801f673
commit
941980171b
5 changed files with 106 additions and 137 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/message_content.dart';
|
||||
import 'package:fluffychat/utils/chat_time.dart';
|
||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||
import 'package:fluffychat/utils/app_route.dart';
|
||||
import 'package:fluffychat/utils/room_name_calculator.dart';
|
||||
import 'package:fluffychat/views/chat.dart';
|
||||
|
|
@ -93,7 +93,7 @@ class ChatListItem extends StatelessWidget {
|
|||
),
|
||||
SizedBox(width: 16),
|
||||
Text(
|
||||
ChatTime(room.timeCreated).toEventTimeString(),
|
||||
room.timeCreated.localizedTimeShort(context),
|
||||
style: TextStyle(
|
||||
color: Color(0xFF555555),
|
||||
fontSize: 13,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import 'package:bubble/bubble.dart';
|
|||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:fluffychat/components/dialogs/redact_message_dialog.dart';
|
||||
import 'package:fluffychat/components/message_content.dart';
|
||||
import 'package:fluffychat/utils/chat_time.dart';
|
||||
import 'package:fluffychat/utils/date_time_extension.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
|
|
@ -126,7 +126,7 @@ class Message extends StatelessWidget {
|
|||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
ChatTime(event.time).toEventTimeString(),
|
||||
event.time.localizedTime(context),
|
||||
style: TextStyle(
|
||||
color: textColor.withAlpha(200),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue