fix: update GroupAvatarBuilder so the groupName is available

This commit is contained in:
Freek van de Ven 2023-11-22 18:03:03 +01:00
parent 19e539734e
commit fde5b289a6
9 changed files with 17 additions and 9 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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,
);

View file

@ -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,
),

View file

@ -161,6 +161,7 @@ class _ChatScreenState extends State<ChatScreen> {
: '',
avatar:
widget.options.groupAvatarBuilder(
chat.title,
chat.imageUrl,
40.0,
),

View file

@ -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: