Skip to content

Commit b46509d

Browse files
authored
Display message timestamp in chat bubble
Added a timestamp display for the chat message.
1 parent 80456ce commit b46509d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/src/widgets/chat_bubble_widget.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
import 'package:chatview_utils/chatview_utils.dart';
2323
import 'package:flutter/material.dart';
24+
import 'package:intl/intl.dart';
2425

2526
import '../extensions/extensions.dart';
2627
import '../models/config_models/feature_active_config.dart';
@@ -312,6 +313,10 @@ class _ChatBubbleWidgetState extends State<ChatBubbleWidget> {
312313
onMaxDuration: _onMaxDuration,
313314
),
314315
),
316+
Text(
317+
DateFormat('hh:mm a').format(widget.message.createdAt),
318+
style: TextStyle(fontSize: 10, color: Colors.grey),
319+
)
315320
],
316321
);
317322
}

0 commit comments

Comments
 (0)