diff --git a/CHANGELOG.md b/CHANGELOG.md index 570b51e..b138f09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.4.3 + +- Added default styling. +- Fixed groupchats using navigator + ## 1.4.2 - Added doc comments diff --git a/packages/flutter_chat/lib/src/flutter_chat_navigator_userstory.dart b/packages/flutter_chat/lib/src/flutter_chat_navigator_userstory.dart index 21aaef9..0ea5323 100644 --- a/packages/flutter_chat/lib/src/flutter_chat_navigator_userstory.dart +++ b/packages/flutter_chat/lib/src/flutter_chat_navigator_userstory.dart @@ -274,20 +274,15 @@ Widget _newGroupChatOverviewScreenRoute( configuration.onPressCompleteGroupChatCreation ?.call(users, groupChatName); if (configuration.onPressCreateGroupChat != null) return; - debugPrint('----------- The list of users = $users -----------'); - debugPrint('----------- Group chat name = $groupChatName -----------'); - var chat = await configuration.chatService.chatOverviewService.storeChatIfNot( GroupChatModel( - id: const Uuid().v4(), canBeDeleted: true, title: groupChatName, imageUrl: 'https://picsum.photos/200/300', users: users, ), ); - debugPrint('----------- Chat id = ${chat.id} -----------'); if (context.mounted) { await Navigator.of(context).push( MaterialPageRoute( diff --git a/packages/flutter_chat/pubspec.yaml b/packages/flutter_chat/pubspec.yaml index c532246..748478e 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: 1.4.2 +version: 1.4.3 publish_to: none @@ -20,17 +20,17 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_view - ref: 1.4.2 + ref: 1.4.3 flutter_chat_interface: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 1.4.2 + ref: 1.4.3 flutter_chat_local: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_local - ref: 1.4.2 + ref: 1.4.3 uuid: ^4.3.3 dev_dependencies: diff --git a/packages/flutter_chat_firebase/pubspec.yaml b/packages/flutter_chat_firebase/pubspec.yaml index f2bda6c..67c9eb5 100644 --- a/packages/flutter_chat_firebase/pubspec.yaml +++ b/packages/flutter_chat_firebase/pubspec.yaml @@ -4,7 +4,7 @@ name: flutter_chat_firebase description: A new Flutter package project. -version: 1.4.2 +version: 1.4.3 publish_to: none environment: @@ -23,7 +23,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 1.4.2 + ref: 1.4.3 dev_dependencies: flutter_iconica_analysis: diff --git a/packages/flutter_chat_interface/pubspec.yaml b/packages/flutter_chat_interface/pubspec.yaml index 3fb2061..dfd6b0c 100644 --- a/packages/flutter_chat_interface/pubspec.yaml +++ b/packages/flutter_chat_interface/pubspec.yaml @@ -4,7 +4,7 @@ name: flutter_chat_interface description: A new Flutter package project. -version: 1.4.2 +version: 1.4.3 publish_to: none environment: diff --git a/packages/flutter_chat_local/pubspec.yaml b/packages/flutter_chat_local/pubspec.yaml index 30233a4..221a65b 100644 --- a/packages/flutter_chat_local/pubspec.yaml +++ b/packages/flutter_chat_local/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_chat_local description: "A new Flutter package project." -version: 1.4.2 +version: 1.4.3 publish_to: none homepage: @@ -15,7 +15,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 1.4.2 + ref: 1.4.3 dev_dependencies: flutter_test: diff --git a/packages/flutter_chat_view/lib/src/config/chat_translations.dart b/packages/flutter_chat_view/lib/src/config/chat_translations.dart index 3c52e19..1156be1 100644 --- a/packages/flutter_chat_view/lib/src/config/chat_translations.dart +++ b/packages/flutter_chat_view/lib/src/config/chat_translations.dart @@ -8,7 +8,7 @@ class ChatTranslations { this.chatsUnread = 'unread', this.newChatButton = 'Start a chat', this.newGroupChatButton = 'Start group chat', - this.newChatTitle = 'Start chat', + this.newChatTitle = 'Start a chat', this.image = 'Image', this.searchPlaceholder = 'Search...', this.startTyping = 'Start typing to find a user to chat with.', diff --git a/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart b/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart index 8dc866f..234325c 100644 --- a/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart @@ -177,7 +177,7 @@ class _ChatDetailScreenState extends State { Navigator.popUntil(context, (route) => route.isFirst); }, child: const Icon( - Icons.arrow_back, + Icons.arrow_back_ios, ), ), title: GestureDetector( @@ -218,8 +218,8 @@ class _ChatDetailScreenState extends State { style: theme.appBarTheme.titleTextStyle ?? const TextStyle( fontWeight: FontWeight.w800, - fontSize: 18.0, - color: Colors.white, + fontSize: 24, + color: Color(0xff71C6D1), ), ), ), 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 ef1aed3..9e56321 100644 --- a/packages/flutter_chat_view/lib/src/screens/chat_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/chat_screen.dart @@ -77,12 +77,15 @@ class _ChatScreenState extends State { var theme = Theme.of(context); return widget.options.scaffoldBuilder( AppBar( - backgroundColor: theme.appBarTheme.backgroundColor ?? Colors.black, + backgroundColor: + theme.appBarTheme.backgroundColor ?? const Color(0xff212121), title: Text( translations.chatsTitle, style: theme.appBarTheme.titleTextStyle ?? const TextStyle( - color: Colors.white, + fontWeight: FontWeight.w800, + fontSize: 24, + color: Color(0xff71C6D1), ), ), centerTitle: true, @@ -123,7 +126,8 @@ class _ChatScreenState extends State { builder: (BuildContext context, snapshot) { // if the stream is done, empty and noChats is set we should call that if (snapshot.connectionState == ConnectionState.done && - (snapshot.data?.isEmpty ?? true)) { + (snapshot.data?.isEmpty ?? true) || + (snapshot.data != null && snapshot.data!.isEmpty)) { if (widget.onNoChats != null && !_hasCalledOnNoChats) { _hasCalledOnNoChats = true; // Set the flag to true WidgetsBinding.instance.addPostFrameCallback((_) async { 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 f31e387..50f2e71 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 @@ -154,7 +154,9 @@ class _NewChatScreenState extends State { widget.translations.newChatTitle, style: theme.appBarTheme.titleTextStyle ?? const TextStyle( - color: Colors.white, + fontWeight: FontWeight.w800, + fontSize: 24, + color: Color(0xff71C6D1), ), ); } diff --git a/packages/flutter_chat_view/lib/src/screens/new_group_chat_screen.dart b/packages/flutter_chat_view/lib/src/screens/new_group_chat_screen.dart index 31cfc66..a7e6c07 100644 --- a/packages/flutter_chat_view/lib/src/screens/new_group_chat_screen.dart +++ b/packages/flutter_chat_view/lib/src/screens/new_group_chat_screen.dart @@ -58,10 +58,11 @@ class _NewGroupChatScreenState extends State { }, ), floatingActionButton: FloatingActionButton( + backgroundColor: const Color(0xff71C6D1), onPressed: () async { await widget.onPressGroupChatOverview(selectedUserList); }, - child: const Icon(Icons.arrow_circle_right), + child: const Icon(Icons.arrow_forward_ios), ), floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, ); @@ -105,7 +106,9 @@ class _NewGroupChatScreenState extends State { widget.translations.newGroupChatButton, style: theme.appBarTheme.titleTextStyle ?? const TextStyle( - color: Colors.white, + fontWeight: FontWeight.w800, + fontSize: 24, + color: Color(0xff71C6D1), ), ); } diff --git a/packages/flutter_chat_view/pubspec.yaml b/packages/flutter_chat_view/pubspec.yaml index 8982d65..9791dae 100644 --- a/packages/flutter_chat_view/pubspec.yaml +++ b/packages/flutter_chat_view/pubspec.yaml @@ -4,7 +4,7 @@ name: flutter_chat_view description: A standard flutter package. -version: 1.4.2 +version: 1.4.3 publish_to: none @@ -20,7 +20,7 @@ dependencies: git: url: https://github.com/Iconica-Development/flutter_chat path: packages/flutter_chat_interface - ref: 1.4.2 + ref: 1.4.3 cached_network_image: ^3.2.2 flutter_image_picker: git: