From fd6daa88d1a830f32b31dfb14ca7973227590c85 Mon Sep 17 00:00:00 2001 From: Freek van de Ven Date: Tue, 18 Jun 2024 07:51:26 +0200 Subject: [PATCH] fix: center the texts for no users found with search and type first message --- CHANGELOG.md | 4 ++++ packages/flutter_chat/pubspec.yaml | 8 ++++---- packages/flutter_chat_firebase/pubspec.yaml | 2 +- packages/flutter_chat_local/pubspec.yaml | 2 +- .../lib/src/config/chat_options.dart | 11 +++++++---- .../lib/src/screens/new_chat_screen.dart | 9 ++++++--- packages/flutter_chat_view/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 8 files changed, 25 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69f8702..253f34f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.1.0 +- Fix center the texts for no users found with search and type first message + + ## 3.0.1 - fix bug where you could make multiple groups quickly by routing back to the previous screen diff --git a/packages/flutter_chat/pubspec.yaml b/packages/flutter_chat/pubspec.yaml index 0b1fa88..0b9f2bc 100644 --- a/packages/flutter_chat/pubspec.yaml +++ b/packages/flutter_chat/pubspec.yaml @@ -4,7 +4,7 @@ name: flutter_chat description: A new Flutter package project. -version: 3.0.1 +version: 3.1.0 publish_to: none @@ -20,17 +20,17 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_view - ref: 3.0.1 + ref: 3.1.0 flutter_chat_interface: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 3.0.1 + ref: 3.1.0 flutter_chat_local: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_local - ref: 3.0.1 + ref: 3.1.0 uuid: ^4.3.3 dev_dependencies: diff --git a/packages/flutter_chat_firebase/pubspec.yaml b/packages/flutter_chat_firebase/pubspec.yaml index 8acc134..dd24ec1 100644 --- a/packages/flutter_chat_firebase/pubspec.yaml +++ b/packages/flutter_chat_firebase/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 3.0.1 + ref: 3.1.0 dev_dependencies: flutter_iconica_analysis: diff --git a/packages/flutter_chat_local/pubspec.yaml b/packages/flutter_chat_local/pubspec.yaml index a659074..c132cae 100644 --- a/packages/flutter_chat_local/pubspec.yaml +++ b/packages/flutter_chat_local/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 3.0.1 + ref: 3.1.0 dev_dependencies: flutter_test: diff --git a/packages/flutter_chat_view/lib/src/config/chat_options.dart b/packages/flutter_chat_view/lib/src/config/chat_options.dart index daa97e6..fcb7807 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_options.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_options.dart @@ -223,10 +223,13 @@ Widget _createNoUsersPlaceholder( var theme = Theme.of(context); return Padding( padding: const EdgeInsets.symmetric(vertical: 20), - child: Text( - translations.noUsersFound, - textAlign: TextAlign.center, - style: theme.textTheme.bodySmall, + child: Align( + alignment: Alignment.topCenter, + child: Text( + translations.noUsersFound, + textAlign: TextAlign.center, + style: theme.textTheme.bodySmall, + ), ), ); } 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 795b4eb..0ac64c2 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 @@ -190,9 +190,12 @@ class _NewChatScreenState extends State { if (_textFieldFocusNode.hasFocus && query.isEmpty) { return Padding( padding: const EdgeInsets.only(top: 20.0), - child: Text( - widget.translations.startTyping, - style: theme.textTheme.bodySmall, + child: Align( + alignment: Alignment.topCenter, + child: Text( + widget.translations.startTyping, + style: theme.textTheme.bodySmall, + ), ), ); } diff --git a/packages/flutter_chat_view/pubspec.yaml b/packages/flutter_chat_view/pubspec.yaml index 9057aa0..7d2f097 100644 --- a/packages/flutter_chat_view/pubspec.yaml +++ b/packages/flutter_chat_view/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 3.0.1 + ref: 3.1.0 cached_network_image: ^3.2.2 flutter_image_picker: git: diff --git a/pubspec.yaml b/pubspec.yaml index ace4fbe..e659cad 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,4 +3,4 @@ name: flutter_chat_workspace environment: sdk: ">=3.1.0 <4.0.0" dev_dependencies: - melos: ^3.0.1 + melos: ^6.1.0