mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-18 18:33:49 +02:00
fix: update GroupAvatarBuilder so the groupName is available
This commit is contained in:
parent
19e539734e
commit
fde5b289a6
9 changed files with 17 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
|||
## 0.4.1 - November 22 2023
|
||||
|
||||
- Add groupName for groupchat avatarbuilder
|
||||
|
||||
## 0.4.0 - November 6 2023
|
||||
|
||||
- Show amount of unread messages per chat
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.0
|
||||
version: 0.4.1
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -19,12 +19,12 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_view
|
||||
ref: 0.4.0
|
||||
ref: 0.4.1
|
||||
flutter_community_chat_interface:
|
||||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.0
|
||||
ref: 0.4.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_firebase
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.0
|
||||
version: 0.4.1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
@ -23,7 +23,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.0
|
||||
ref: 0.4.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.0
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_interface
|
||||
description: A new Flutter package project.
|
||||
version: 0.4.0
|
||||
version: 0.4.1
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
|
|
|
@ -18,7 +18,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_view
|
||||
ref: 0.4.0
|
||||
ref: 0.4.1
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
|
@ -104,6 +104,7 @@ Widget _createUserAvatar(
|
|||
size: size,
|
||||
);
|
||||
Widget _createGroupAvatar(
|
||||
String groupName,
|
||||
String imageUrl,
|
||||
double size,
|
||||
) =>
|
||||
|
@ -158,6 +159,7 @@ typedef UserAvatarBuilder = Widget Function(
|
|||
);
|
||||
|
||||
typedef GroupAvatarBuilder = Widget Function(
|
||||
String groupName,
|
||||
String imageUrl,
|
||||
double size,
|
||||
);
|
||||
|
|
|
@ -116,6 +116,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
|
|||
: [
|
||||
if (widget.chat is GroupChatModel) ...[
|
||||
widget.options.groupAvatarBuilder(
|
||||
(widget.chat! as GroupChatModel).title,
|
||||
(widget.chat! as GroupChatModel).imageUrl,
|
||||
36.0,
|
||||
),
|
||||
|
|
|
@ -161,6 +161,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
|||
: '',
|
||||
avatar:
|
||||
widget.options.groupAvatarBuilder(
|
||||
chat.title,
|
||||
chat.imageUrl,
|
||||
40.0,
|
||||
),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_community_chat_view
|
||||
description: A standard flutter package.
|
||||
version: 0.4.0
|
||||
version: 0.4.1
|
||||
|
||||
publish_to: none
|
||||
|
||||
|
@ -20,7 +20,7 @@ dependencies:
|
|||
git:
|
||||
url: https://github.com/Iconica-Development/flutter_community_chat
|
||||
path: packages/flutter_community_chat_interface
|
||||
ref: 0.4.0
|
||||
ref: 0.4.1
|
||||
cached_network_image: ^3.2.2
|
||||
flutter_image_picker:
|
||||
git:
|
||||
|
|
Loading…
Reference in a new issue