mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 02:43:50 +02:00
fix: default_styling
This commit is contained in:
parent
c370df0bdd
commit
58451a7e5e
12 changed files with 35 additions and 26 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
## 1.4.3
|
||||||
|
|
||||||
|
- Added default styling.
|
||||||
|
- Fixed groupchats using navigator
|
||||||
|
|
||||||
## 1.4.2
|
## 1.4.2
|
||||||
|
|
||||||
- Added doc comments
|
- Added doc comments
|
||||||
|
|
|
@ -274,20 +274,15 @@ Widget _newGroupChatOverviewScreenRoute(
|
||||||
configuration.onPressCompleteGroupChatCreation
|
configuration.onPressCompleteGroupChatCreation
|
||||||
?.call(users, groupChatName);
|
?.call(users, groupChatName);
|
||||||
if (configuration.onPressCreateGroupChat != null) return;
|
if (configuration.onPressCreateGroupChat != null) return;
|
||||||
debugPrint('----------- The list of users = $users -----------');
|
|
||||||
debugPrint('----------- Group chat name = $groupChatName -----------');
|
|
||||||
|
|
||||||
var chat =
|
var chat =
|
||||||
await configuration.chatService.chatOverviewService.storeChatIfNot(
|
await configuration.chatService.chatOverviewService.storeChatIfNot(
|
||||||
GroupChatModel(
|
GroupChatModel(
|
||||||
id: const Uuid().v4(),
|
|
||||||
canBeDeleted: true,
|
canBeDeleted: true,
|
||||||
title: groupChatName,
|
title: groupChatName,
|
||||||
imageUrl: 'https://picsum.photos/200/300',
|
imageUrl: 'https://picsum.photos/200/300',
|
||||||
users: users,
|
users: users,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
debugPrint('----------- Chat id = ${chat.id} -----------');
|
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
await Navigator.of(context).push(
|
await Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_chat
|
name: flutter_chat
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
|
@ -20,17 +20,17 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_view
|
path: packages/flutter_chat_view
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
flutter_chat_interface:
|
flutter_chat_interface:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_interface
|
path: packages/flutter_chat_interface
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
flutter_chat_local:
|
flutter_chat_local:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_local
|
path: packages/flutter_chat_local
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
uuid: ^4.3.3
|
uuid: ^4.3.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_chat_firebase
|
name: flutter_chat_firebase
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
@ -23,7 +23,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_interface
|
path: packages/flutter_chat_interface
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_iconica_analysis:
|
flutter_iconica_analysis:
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_chat_interface
|
name: flutter_chat_interface
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: flutter_chat_local
|
name: flutter_chat_local
|
||||||
description: "A new Flutter package project."
|
description: "A new Flutter package project."
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
publish_to: none
|
publish_to: none
|
||||||
homepage:
|
homepage:
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_interface
|
path: packages/flutter_chat_interface
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
@ -8,7 +8,7 @@ class ChatTranslations {
|
||||||
this.chatsUnread = 'unread',
|
this.chatsUnread = 'unread',
|
||||||
this.newChatButton = 'Start a chat',
|
this.newChatButton = 'Start a chat',
|
||||||
this.newGroupChatButton = 'Start group chat',
|
this.newGroupChatButton = 'Start group chat',
|
||||||
this.newChatTitle = 'Start chat',
|
this.newChatTitle = 'Start a chat',
|
||||||
this.image = 'Image',
|
this.image = 'Image',
|
||||||
this.searchPlaceholder = 'Search...',
|
this.searchPlaceholder = 'Search...',
|
||||||
this.startTyping = 'Start typing to find a user to chat with.',
|
this.startTyping = 'Start typing to find a user to chat with.',
|
||||||
|
|
|
@ -177,7 +177,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
|
||||||
Navigator.popUntil(context, (route) => route.isFirst);
|
Navigator.popUntil(context, (route) => route.isFirst);
|
||||||
},
|
},
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
Icons.arrow_back,
|
Icons.arrow_back_ios,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: GestureDetector(
|
title: GestureDetector(
|
||||||
|
@ -218,8 +218,8 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
|
||||||
style: theme.appBarTheme.titleTextStyle ??
|
style: theme.appBarTheme.titleTextStyle ??
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
fontWeight: FontWeight.w800,
|
fontWeight: FontWeight.w800,
|
||||||
fontSize: 18.0,
|
fontSize: 24,
|
||||||
color: Colors.white,
|
color: Color(0xff71C6D1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -77,12 +77,15 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||||
var theme = Theme.of(context);
|
var theme = Theme.of(context);
|
||||||
return widget.options.scaffoldBuilder(
|
return widget.options.scaffoldBuilder(
|
||||||
AppBar(
|
AppBar(
|
||||||
backgroundColor: theme.appBarTheme.backgroundColor ?? Colors.black,
|
backgroundColor:
|
||||||
|
theme.appBarTheme.backgroundColor ?? const Color(0xff212121),
|
||||||
title: Text(
|
title: Text(
|
||||||
translations.chatsTitle,
|
translations.chatsTitle,
|
||||||
style: theme.appBarTheme.titleTextStyle ??
|
style: theme.appBarTheme.titleTextStyle ??
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
color: Colors.white,
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 24,
|
||||||
|
color: Color(0xff71C6D1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
@ -123,7 +126,8 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||||
builder: (BuildContext context, snapshot) {
|
builder: (BuildContext context, snapshot) {
|
||||||
// if the stream is done, empty and noChats is set we should call that
|
// if the stream is done, empty and noChats is set we should call that
|
||||||
if (snapshot.connectionState == ConnectionState.done &&
|
if (snapshot.connectionState == ConnectionState.done &&
|
||||||
(snapshot.data?.isEmpty ?? true)) {
|
(snapshot.data?.isEmpty ?? true) ||
|
||||||
|
(snapshot.data != null && snapshot.data!.isEmpty)) {
|
||||||
if (widget.onNoChats != null && !_hasCalledOnNoChats) {
|
if (widget.onNoChats != null && !_hasCalledOnNoChats) {
|
||||||
_hasCalledOnNoChats = true; // Set the flag to true
|
_hasCalledOnNoChats = true; // Set the flag to true
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
|
|
|
@ -154,7 +154,9 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
||||||
widget.translations.newChatTitle,
|
widget.translations.newChatTitle,
|
||||||
style: theme.appBarTheme.titleTextStyle ??
|
style: theme.appBarTheme.titleTextStyle ??
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
color: Colors.white,
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 24,
|
||||||
|
color: Color(0xff71C6D1),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,10 +58,11 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
|
backgroundColor: const Color(0xff71C6D1),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await widget.onPressGroupChatOverview(selectedUserList);
|
await widget.onPressGroupChatOverview(selectedUserList);
|
||||||
},
|
},
|
||||||
child: const Icon(Icons.arrow_circle_right),
|
child: const Icon(Icons.arrow_forward_ios),
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
|
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
|
||||||
);
|
);
|
||||||
|
@ -105,7 +106,9 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
|
||||||
widget.translations.newGroupChatButton,
|
widget.translations.newGroupChatButton,
|
||||||
style: theme.appBarTheme.titleTextStyle ??
|
style: theme.appBarTheme.titleTextStyle ??
|
||||||
const TextStyle(
|
const TextStyle(
|
||||||
color: Colors.white,
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 24,
|
||||||
|
color: Color(0xff71C6D1),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
name: flutter_chat_view
|
name: flutter_chat_view
|
||||||
description: A standard flutter package.
|
description: A standard flutter package.
|
||||||
version: 1.4.2
|
version: 1.4.3
|
||||||
|
|
||||||
publish_to: none
|
publish_to: none
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_chat
|
url: https://github.com/Iconica-Development/flutter_chat
|
||||||
path: packages/flutter_chat_interface
|
path: packages/flutter_chat_interface
|
||||||
ref: 1.4.2
|
ref: 1.4.3
|
||||||
cached_network_image: ^3.2.2
|
cached_network_image: ^3.2.2
|
||||||
flutter_image_picker:
|
flutter_image_picker:
|
||||||
git:
|
git:
|
||||||
|
|
Loading…
Reference in a new issue