mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +02:00
refactor: polish chat detail screen
This commit is contained in:
parent
6e2d0feac9
commit
89edfdd18c
2 changed files with 24 additions and 35 deletions
|
@ -102,11 +102,11 @@ class _ChatDetailRowState extends State<ChatDetailRow> {
|
|||
)
|
||||
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<ChatDetailRow> {
|
|||
showFullDate: true,
|
||||
),
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: Color(0xFFBBBBBB),
|
||||
),
|
||||
),
|
||||
|
|
|
@ -196,40 +196,28 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
|
|||
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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue