Skip to content

Commit 37e975c

Browse files
authored
Merge pull request #67 from Iconica-Development/bugfix/default_styling
fix: default_styling
2 parents c370df0 + 58451a7 commit 37e975c

File tree

12 files changed

+35
-26
lines changed

12 files changed

+35
-26
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.4.3
2+
3+
- Added default styling.
4+
- Fixed groupchats using navigator
5+
16
## 1.4.2
27

38
- Added doc comments

packages/flutter_chat/lib/src/flutter_chat_navigator_userstory.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,20 +274,15 @@ Widget _newGroupChatOverviewScreenRoute(
274274
configuration.onPressCompleteGroupChatCreation
275275
?.call(users, groupChatName);
276276
if (configuration.onPressCreateGroupChat != null) return;
277-
debugPrint('----------- The list of users = $users -----------');
278-
debugPrint('----------- Group chat name = $groupChatName -----------');
279-
280277
var chat =
281278
await configuration.chatService.chatOverviewService.storeChatIfNot(
282279
GroupChatModel(
283-
id: const Uuid().v4(),
284280
canBeDeleted: true,
285281
title: groupChatName,
286282
imageUrl: 'https://picsum.photos/200/300',
287283
users: users,
288284
),
289285
);
290-
debugPrint('----------- Chat id = ${chat.id} -----------');
291286
if (context.mounted) {
292287
await Navigator.of(context).push(
293288
MaterialPageRoute(

packages/flutter_chat/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: flutter_chat
66
description: A new Flutter package project.
7-
version: 1.4.2
7+
version: 1.4.3
88

99
publish_to: none
1010

@@ -20,17 +20,17 @@ dependencies:
2020
git:
2121
url: https://github.com/Iconica-Development/flutter_chat
2222
path: packages/flutter_chat_view
23-
ref: 1.4.2
23+
ref: 1.4.3
2424
flutter_chat_interface:
2525
git:
2626
url: https://github.com/Iconica-Development/flutter_chat
2727
path: packages/flutter_chat_interface
28-
ref: 1.4.2
28+
ref: 1.4.3
2929
flutter_chat_local:
3030
git:
3131
url: https://github.com/Iconica-Development/flutter_chat
3232
path: packages/flutter_chat_local
33-
ref: 1.4.2
33+
ref: 1.4.3
3434
uuid: ^4.3.3
3535

3636
dev_dependencies:

packages/flutter_chat_firebase/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: flutter_chat_firebase
66
description: A new Flutter package project.
7-
version: 1.4.2
7+
version: 1.4.3
88
publish_to: none
99

1010
environment:
@@ -23,7 +23,7 @@ dependencies:
2323
git:
2424
url: https://github.com/Iconica-Development/flutter_chat
2525
path: packages/flutter_chat_interface
26-
ref: 1.4.2
26+
ref: 1.4.3
2727

2828
dev_dependencies:
2929
flutter_iconica_analysis:

packages/flutter_chat_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: flutter_chat_interface
66
description: A new Flutter package project.
7-
version: 1.4.2
7+
version: 1.4.3
88
publish_to: none
99

1010
environment:

packages/flutter_chat_local/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_chat_local
22
description: "A new Flutter package project."
3-
version: 1.4.2
3+
version: 1.4.3
44
publish_to: none
55
homepage:
66

@@ -15,7 +15,7 @@ dependencies:
1515
git:
1616
url: https://github.com/Iconica-Development/flutter_chat
1717
path: packages/flutter_chat_interface
18-
ref: 1.4.2
18+
ref: 1.4.3
1919

2020
dev_dependencies:
2121
flutter_test:

packages/flutter_chat_view/lib/src/config/chat_translations.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class ChatTranslations {
88
this.chatsUnread = 'unread',
99
this.newChatButton = 'Start a chat',
1010
this.newGroupChatButton = 'Start group chat',
11-
this.newChatTitle = 'Start chat',
11+
this.newChatTitle = 'Start a chat',
1212
this.image = 'Image',
1313
this.searchPlaceholder = 'Search...',
1414
this.startTyping = 'Start typing to find a user to chat with.',

packages/flutter_chat_view/lib/src/screens/chat_detail_screen.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
177177
Navigator.popUntil(context, (route) => route.isFirst);
178178
},
179179
child: const Icon(
180-
Icons.arrow_back,
180+
Icons.arrow_back_ios,
181181
),
182182
),
183183
title: GestureDetector(
@@ -218,8 +218,8 @@ class _ChatDetailScreenState extends State<ChatDetailScreen> {
218218
style: theme.appBarTheme.titleTextStyle ??
219219
const TextStyle(
220220
fontWeight: FontWeight.w800,
221-
fontSize: 18.0,
222-
color: Colors.white,
221+
fontSize: 24,
222+
color: Color(0xff71C6D1),
223223
),
224224
),
225225
),

packages/flutter_chat_view/lib/src/screens/chat_screen.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,15 @@ class _ChatScreenState extends State<ChatScreen> {
7777
var theme = Theme.of(context);
7878
return widget.options.scaffoldBuilder(
7979
AppBar(
80-
backgroundColor: theme.appBarTheme.backgroundColor ?? Colors.black,
80+
backgroundColor:
81+
theme.appBarTheme.backgroundColor ?? const Color(0xff212121),
8182
title: Text(
8283
translations.chatsTitle,
8384
style: theme.appBarTheme.titleTextStyle ??
8485
const TextStyle(
85-
color: Colors.white,
86+
fontWeight: FontWeight.w800,
87+
fontSize: 24,
88+
color: Color(0xff71C6D1),
8689
),
8790
),
8891
centerTitle: true,
@@ -123,7 +126,8 @@ class _ChatScreenState extends State<ChatScreen> {
123126
builder: (BuildContext context, snapshot) {
124127
// if the stream is done, empty and noChats is set we should call that
125128
if (snapshot.connectionState == ConnectionState.done &&
126-
(snapshot.data?.isEmpty ?? true)) {
129+
(snapshot.data?.isEmpty ?? true) ||
130+
(snapshot.data != null && snapshot.data!.isEmpty)) {
127131
if (widget.onNoChats != null && !_hasCalledOnNoChats) {
128132
_hasCalledOnNoChats = true; // Set the flag to true
129133
WidgetsBinding.instance.addPostFrameCallback((_) async {

packages/flutter_chat_view/lib/src/screens/new_chat_screen.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ class _NewChatScreenState extends State<NewChatScreen> {
154154
widget.translations.newChatTitle,
155155
style: theme.appBarTheme.titleTextStyle ??
156156
const TextStyle(
157-
color: Colors.white,
157+
fontWeight: FontWeight.w800,
158+
fontSize: 24,
159+
color: Color(0xff71C6D1),
158160
),
159161
);
160162
}

0 commit comments

Comments
 (0)