From 644615f02613456f3c92df8458ed53d54756cf11 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 66bcada..177bdfa 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: https://forgejo.internal.iconica.nl/api/packages/internal/pub @@ -18,13 +18,13 @@ dependencies: go_router: ^14.2.1 flutter_chat_view: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^3.1.0 flutter_chat_interface: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^3.1.0 flutter_chat_local: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^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 b0d7432..55e5aa1 100644 --- a/packages/flutter_chat_firebase/pubspec.yaml +++ b/packages/flutter_chat_firebase/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: uuid: ^4.0.0 flutter_chat_interface: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^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 112b8b0..40a8f0a 100644 --- a/packages/flutter_chat_local/pubspec.yaml +++ b/packages/flutter_chat_local/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter flutter_chat_interface: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^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 aff57c0..40ff8d3 100644 --- a/packages/flutter_chat_view/pubspec.yaml +++ b/packages/flutter_chat_view/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: intl: ^0.19.0 flutter_chat_interface: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub - version: ^3.0.1 + version: ^3.1.0 cached_network_image: ^3.2.2 flutter_image_picker: hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub 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