diff --git a/packages/flutter_chat_view/lib/src/components/chat_detail_row.dart b/packages/flutter_chat_view/lib/src/components/chat_detail_row.dart index 3140518..75b9838 100644 --- a/packages/flutter_chat_view/lib/src/components/chat_detail_row.dart +++ b/packages/flutter_chat_view/lib/src/components/chat_detail_row.dart @@ -102,11 +102,11 @@ class _ChatDetailRowState extends State { ) else Text( - widget.message.sender.fullName?.toUpperCase() ?? + widget.message.sender.fullName ?? widget.translations.anonymousUser, style: TextStyle( - fontSize: 14, - fontWeight: FontWeight.w500, + fontSize: 16, + fontWeight: FontWeight.w800, color: Theme.of(context) .textTheme .labelMedium @@ -121,7 +121,8 @@ class _ChatDetailRowState extends State { showFullDate: true, ), style: const TextStyle( - fontSize: 12, + fontSize: 16, + fontWeight: FontWeight.w300, color: Color(0xFFBBBBBB), ), ), diff --git a/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart b/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart index 5987a06..15ee954 100644 --- a/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart @@ -196,40 +196,28 @@ class _ChatDetailScreenState extends State { 36.0, ), ] else if (chatModel is PersonalChatModel) ...[ - widget.options.userAvatarBuilder( - chatModel.user, - 36.0, + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + widget.options.userAvatarBuilder( + chatModel.user, + 36.0, + ), + const SizedBox(width: 8), + Text( + chatModel.user.firstName ?? + widget.translations.anonymousUser, + style: theme.appBarTheme.titleTextStyle ?? + const TextStyle( + fontSize: 18, + fontWeight: FontWeight.w800, + color: Colors.white, + ), + ), + ], ), ] else ...[], - Expanded( - child: Padding( - padding: const EdgeInsets.only(left: 15.5), - child: widget.chatTitleBuilder != null - ? widget.chatTitleBuilder!.call( - (chatModel is GroupChatModel) - ? chatModel.title - : (chatModel is PersonalChatModel) - ? chatModel.user.fullName ?? - widget - .translations.anonymousUser - : '', - ) - : Text( - (chatModel is GroupChatModel) - ? chatModel.title - : (chatModel is PersonalChatModel) - ? chatModel.user.fullName ?? - widget - .translations.anonymousUser - : '', - style: theme.appBarTheme.titleTextStyle ?? - const TextStyle( - color: Colors.white, - ), - ), - ), - ), ], ), ),