From 1eb5f99b7b87e2a0668ffbe4ec49e450f8a6bcef Mon Sep 17 00:00:00 2001 From: Freek van de Ven Date: Thu, 23 May 2024 16:49:26 +0200 Subject: [PATCH] fix: remove divider at the new chat screen because it is not working correctly --- CHANGELOG.md | 1 + .../flutter_chat/lib/src/models/chat_configuration.dart | 2 +- packages/flutter_chat_view/lib/src/screens/chat_screen.dart | 1 - .../flutter_chat_view/lib/src/screens/new_chat_screen.dart | 6 +----- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index acb7b46..a73c857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Change onPressUserProfile callback to use a ChatUserModel instead of a String - Add a enableGroupChatCreation boolean to the userstory configuration to enable or disable group chat creation - Change the ChatTranslations constructor to require all translations or use the ChatTranslations.empty constructor if you don't want to specify all translations +- Remove the Divider between the users on the new chat screen ## 1.4.3 diff --git a/packages/flutter_chat/lib/src/models/chat_configuration.dart b/packages/flutter_chat/lib/src/models/chat_configuration.dart index 0b1f905..9e670d9 100644 --- a/packages/flutter_chat/lib/src/models/chat_configuration.dart +++ b/packages/flutter_chat/lib/src/models/chat_configuration.dart @@ -29,7 +29,7 @@ class ChatUserStoryConfiguration { this.disableDismissForPermanentChats = false, this.routeToNewChatIfEmpty = true, this.enableGroupChatCreation = true, - this.translations = const ChatTranslations(), + this.translations = const ChatTranslations.empty(), this.translationsBuilder, this.chatPageBuilder, this.onPressChatTitle, diff --git a/packages/flutter_chat_view/lib/src/screens/chat_screen.dart b/packages/flutter_chat_view/lib/src/screens/chat_screen.dart index bfddd58..baf76aa 100644 --- a/packages/flutter_chat_view/lib/src/screens/chat_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/chat_screen.dart @@ -384,7 +384,6 @@ class ChatListItem extends StatelessWidget { ), ), ), - const Divider(), ], ); } diff --git a/packages/flutter_chat_view/lib/src/screens/new_chat_screen.dart b/packages/flutter_chat_view/lib/src/screens/new_chat_screen.dart index 0be987b..8d5be29 100644 --- a/packages/flutter_chat_view/lib/src/screens/new_chat_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/new_chat_screen.dart @@ -221,12 +221,8 @@ class _NewChatScreenState extends State { return widget.options.noChatsPlaceholderBuilder(widget.translations); } - return ListView.separated( + return ListView.builder( itemCount: filteredUsers.length, - separatorBuilder: (context, index) => const Padding( - padding: EdgeInsets.symmetric(horizontal: 28.0), - child: Divider(), - ), itemBuilder: (context, index) { var user = filteredUsers[index]; return GestureDetector(