Skip to content

Commit 9bf1980

Browse files
committed
dependencies upgrade
1 parent d2e4624 commit 9bf1980

File tree

6 files changed

+13
-18
lines changed

6 files changed

+13
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## version 0.1.4 dependencies upgrade
1+
## version 1.0.0 dependencies updated
2+
## version 0.1.4 user online/offline status
23
## version 0.1.3 widget seprated
34
## version 0.1.2 example added
45
## version 0.1.1 add screen widgets

lib/chatDB.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ class ChatDBFireStore {
2323
}
2424

2525
static saveNewUser(User logInUser) {
26-
FirebaseFirestore.instance
27-
.collection(getDocName())
28-
.doc(logInUser.uid)
29-
.set({
26+
FirebaseFirestore.instance.collection(getDocName()).doc(logInUser.uid).set({
3027
'nickname': logInUser.displayName,
3128
'photoUrl': logInUser.photoURL,
3229
'userId': logInUser.uid,

lib/chatData.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,10 @@ class ChatData {
9898
}
9999

100100
static Future<bool> authUsersGoogle() async {
101-
102-
103101
await Firebase.initializeApp();
104102
final GoogleSignIn googleSignIn = GoogleSignIn();
105103
final FirebaseAuth firebaseAuth = FirebaseAuth.instance;
106104

107-
108105
GoogleSignInAccount googleUser = await googleSignIn.signIn();
109106
GoogleSignInAuthentication googleAuth = await googleUser.authentication;
110107

@@ -113,7 +110,8 @@ class ChatData {
113110
idToken: googleAuth.idToken,
114111
);
115112

116-
final UserCredential logInUser = await firebaseAuth.signInWithCredential(credential);
113+
final UserCredential logInUser =
114+
await firebaseAuth.signInWithCredential(credential);
117115

118116
if (logInUser != null) {
119117
// Check is already sign up

lib/chatWidget.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ class ChatWidget {
198198
children: <Widget>[
199199
document.get('type') == 0
200200
? chatText(document.get('content'), id, listMessage, index, true)
201-
: chatImage(
202-
context, id, listMessage, document.get('content'), index, true)
201+
: chatImage(context, id, listMessage, document.get('content'),
202+
index, true)
203203
],
204204
mainAxisAlignment: MainAxisAlignment.end,
205205
);
@@ -221,8 +221,8 @@ class ChatWidget {
221221
document.get('type') == 0
222222
? chatText(
223223
document.get('content'), id, listMessage, index, false)
224-
: chatImage(context, id, listMessage, document.get('content'),
225-
index, false)
224+
: chatImage(context, id, listMessage,
225+
document.get('content'), index, false)
226226
],
227227
),
228228

lib/screens/chat.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'package:image_picker/image_picker.dart';
99
import '../chatWidget.dart';
1010
import '../constants.dart';
1111

12-
1312
class Chat extends StatelessWidget {
1413
final String peerId;
1514
final String peerAvatar;
@@ -185,7 +184,7 @@ class _ChatScreenState extends State<_ChatScreen> {
185184
}
186185

187186
Future<bool> onBackPress() {
188-
Navigator.pop(context);
187+
Navigator.pop(context);
189188
return Future.value(false);
190189
}
191190

@@ -197,7 +196,8 @@ class _ChatScreenState extends State<_ChatScreen> {
197196
Column(
198197
children: <Widget>[
199198
// List of messages
200-
ChatWidget.widgetChatBuildListMessage(groupChatId,listMessage,widget.currentUserId,peerAvatar,listScrollController),
199+
ChatWidget.widgetChatBuildListMessage(groupChatId, listMessage,
200+
widget.currentUserId, peerAvatar, listScrollController),
201201

202202
// Input content
203203
buildInput(),
@@ -290,5 +290,4 @@ class _ChatScreenState extends State<_ChatScreen> {
290290
color: Colors.white),
291291
);
292292
}
293-
294293
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_chat
22
description: Chat helper for Flutter android and iOS using firebase as backend services.
33

4-
version: 0.1.4
4+
version: 1.0.0
55
homepage: https://github.com/ankesh-kumar/Flutter-chat-sdk
66
environment:
77
sdk: ">=2.0.0-dev.68.0 <3.0.0"

0 commit comments

Comments
 (0)