Skip to content

Commit

Permalink
Support show user name in message
Browse files Browse the repository at this point in the history
  • Loading branch information
flowbehappy committed Jul 27, 2023
1 parent fd9346e commit a067699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/components/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class _ChatWindowState extends State<ChatWindow> {
switch (message.source) {
case MessageSource.user:
icon = FontAwesomeIcons.fish;
name = "User";
name = message.userName;
color = const Color.fromARGB(255, 156, 225, 111);
msg_box = Padding(
padding: const EdgeInsets.all(8.0),
Expand All @@ -210,7 +210,7 @@ class _ChatWindowState extends State<ChatWindow> {
break;
case MessageSource.bot:
icon = FontAwesomeIcons.robot;
name = "Bot";
name = "Bot#${message.userName}";
color = isDark
? const Color.fromARGB(255, 92, 89, 89)
: const Color.fromARGB(255, 255, 255, 255);
Expand Down

0 comments on commit a067699

Please sign in to comment.