Merge pull request #67 from Iconica-Development/bugfix/default_styling

fix: default_styling
This commit is contained in:
Gorter-dev 2024-04-26 13:52:57 +02:00 committed by GitHub
commit 37e975ceec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 35 additions and 26 deletions

View file

@ -1,3 +1,8 @@
## 1.4.3
- Added default styling.
- Fixed groupchats using navigator
## 1.4.2
- Added doc comments

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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.',

View file

@ -177,7 +177,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
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<ChatDetailScreen> {
style: theme.appBarTheme.titleTextStyle ??
const TextStyle(
fontWeight: FontWeight.w800,
fontSize: 18.0,
color: Colors.white,
fontSize: 24,
color: Color(0xff71C6D1),
),
),
),

View file

@ -77,12 +77,15 @@ class _ChatScreenState extends State<ChatScreen> {
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<ChatScreen> {
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 {

View file

@ -154,7 +154,9 @@ class _NewChatScreenState extends State<NewChatScreen> {
widget.translations.newChatTitle,
style: theme.appBarTheme.titleTextStyle ??
const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 24,
color: Color(0xff71C6D1),
),
);
}

View file

@ -58,10 +58,11 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
},
),
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<NewGroupChatScreen> {
widget.translations.newGroupChatButton,
style: theme.appBarTheme.titleTextStyle ??
const TextStyle(
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 24,
color: Color(0xff71C6D1),
),
);
}

View file

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