Skip to content

Commit d610bb0

Browse files
authored
Merge pull request #6 from ankesh-kumar/1.1.1
dependency updated
2 parents 188e967 + 74f9a21 commit d610bb0

File tree

6 files changed

+102
-49
lines changed

6 files changed

+102
-49
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
## version 1.1.1 dependencies updated
12
## version 1.1.0 Chat with added friends only (privacy)
23
## version 1.0.0 dependencies updated
34
## version 0.1.4 user online/offline status

lib/chatDB.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ChatDBFireStore {
1515
.collection(getDocName())
1616
.where('userId', isEqualTo: logInUser.uid)
1717
.get();
18-
final List<DocumentSnapshot> documents = result.documents;
18+
final List<DocumentSnapshot> documents = result.docs;
1919
if (documents.length == 0) {
2020
// Update data to server if new user
2121
await saveNewUser(logInUser);

lib/screens/chat.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Chat extends StatelessWidget {
1515
final String peerName;
1616
final String currentUserId;
1717
static const String id = "chat";
18+
1819
Chat(
1920
{Key key,
2021
@required this.currentUserId,
@@ -132,13 +133,13 @@ class _ChatScreenState extends State<_ChatScreen> {
132133

133134
Future uploadFile() async {
134135
String fileName = DateTime.now().millisecondsSinceEpoch.toString();
135-
StorageReference reference = FirebaseStorage.instance.ref().child(fileName);
136+
Reference reference = FirebaseStorage.instance.ref().child(fileName);
136137

137138
File compressedFile = await FlutterNativeImage.compressImage(imageFile.path,
138139
quality: 80, percentage: 90);
139140

140-
StorageUploadTask uploadTask = reference.putFile(compressedFile);
141-
StorageTaskSnapshot storageTaskSnapshot = await uploadTask.onComplete;
141+
UploadTask uploadTask = reference.putFile(compressedFile);
142+
TaskSnapshot storageTaskSnapshot = await uploadTask;
142143
storageTaskSnapshot.ref.getDownloadURL().then((downloadUrl) {
143144
imageUrl = downloadUrl;
144145
setState(() {

lib/screens/dashboard_screen.dart

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ List<dynamic> friendList = [];
1515
class DashboardScreen extends StatefulWidget {
1616
static const String id = "dashboard_screen";
1717
final String currentUserId;
18+
1819
DashboardScreen({Key key, @required this.currentUserId}) : super(key: key);
1920

2021
@override
@@ -85,39 +86,41 @@ class _DashboardScreenState extends State<DashboardScreen> {
8586

8687
_showAddFriendDialog() async {
8788
await showDialog<String>(
88-
context: context,
89-
child: new _SystemPadding(
90-
child: new AlertDialog(
91-
contentPadding: const EdgeInsets.all(16.0),
92-
content: new Row(
93-
children: <Widget>[
94-
new Expanded(
95-
child: new TextField(
96-
autofocus: true,
97-
controller: friendController,
98-
decoration: new InputDecoration(
99-
labelText: 'user Email', hintText: 'ankeshkumar@live.in'),
100-
),
101-
)
102-
],
103-
),
104-
actions: <Widget>[
105-
new FlatButton(
106-
child: const Text('CANCEL'),
107-
onPressed: () {
108-
Navigator.pop(context);
109-
}),
110-
new FlatButton(
111-
child: const Text('Add'),
112-
onPressed: () {
113-
print(friendController.text);
114-
//if(friendController.text!='')
115-
_addNewFriend();
116-
})
117-
],
118-
),
119-
),
120-
);
89+
context: context,
90+
builder: (context) {
91+
return _SystemPadding(
92+
child: new AlertDialog(
93+
contentPadding: const EdgeInsets.all(16.0),
94+
content: new Row(
95+
children: <Widget>[
96+
new Expanded(
97+
child: new TextField(
98+
autofocus: true,
99+
controller: friendController,
100+
decoration: new InputDecoration(
101+
labelText: 'user Email',
102+
hintText: 'ankeshkumar@live.in'),
103+
),
104+
)
105+
],
106+
),
107+
actions: <Widget>[
108+
new TextButton(
109+
child: const Text('CANCEL'),
110+
onPressed: () {
111+
Navigator.pop(context);
112+
}),
113+
new TextButton(
114+
child: const Text('Add'),
115+
onPressed: () {
116+
print(friendController.text);
117+
//if(friendController.text!='')
118+
_addNewFriend();
119+
})
120+
],
121+
),
122+
);
123+
});
121124
}
122125

123126
void _addNewFriend() {

lib/screens/zoomImage.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import '../constants.dart';
55
class ZoomImage extends StatelessWidget {
66
final String url;
77
static const String id = "ZoomImage";
8+
89
ZoomImage({Key key, @required this.url}) : super(key: key);
910

1011
@override

pubspec.yaml

Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,88 @@
11
name: flutter_chat
22
description: Social Chat for Flutter android and iOS using firebase as backend services.
33

4-
version: 1.1.0
4+
version: 1.1.1
55
homepage: https://github.com/ankesh-kumar/Flutter-chat-sdk
6+
67
environment:
7-
sdk: ">=2.0.0-dev.68.0 <3.0.0"
8+
sdk: ">=2.7.0 <3.0.0"
89

910
dependencies:
1011
flutter:
1112
sdk: flutter
1213

14+
1315
# The following adds the Cupertino Icons font to your application.
1416
# Use with the CupertinoIcons class for iOS style icons.
1517
cupertino_icons: ^1.0.0
16-
firebase_core: ^0.5.0
17-
firebase_auth: ^0.18.0+1
18-
firebase_analytics: ^6.0.0
19-
firebase_storage: ^4.0.0
20-
firebase_messaging: ^7.0.0
21-
cloud_firestore: ^0.14.0+2
18+
rxdart: ^0.26.0
19+
shared_preferences: ^2.0.3
20+
firebase_core: ^0.7.0
21+
firebase_auth: ^0.20.1
22+
firebase_analytics: ^7.0.1
23+
firebase_storage: ^7.0.0
24+
firebase_messaging: ^8.0.0-dev.15
25+
cloud_firestore: ^0.16.0+1
2226
fluttertoast: ^7.1.1
2327
image_picker: ^0.6.2+3
24-
photo_view: ^0.10.2
28+
photo_view: ^0.11.1
2529
google_sign_in: ^4.0.4
2630
flutter_native_image: ^0.0.4
2731
cached_network_image: ^2.0.0-rc
2832
flutter_dialogflow: ^0.1.3
2933
intl: ^0.16.0
30-
firebase_database: ^4.0.0
31-
34+
firebase_database: ^6.0.0
35+
bloc: ^6.0.3
36+
flutter_bloc: ^6.0.6
37+
equatable: ^2.0.0
38+
39+
3240
dev_dependencies:
3341
flutter_test:
3442
sdk: flutter
3543

44+
# For information on the generic Dart part of this file, see the
45+
# following page: https://dart.dev/tools/pub/pubspec
46+
47+
# The following section is specific to Flutter.
3648
flutter:
49+
50+
# The following line ensures that the Material Icons font is
51+
# included with your application, so that you can use the icons in
52+
# the material Icons class.
3753
uses-material-design: true
3854

55+
3956
assets:
40-
- images/
57+
- images/
58+
59+
# To add assets to your application, add an assets section, like this:
60+
# assets:
61+
# - images/a_dot_burr.jpeg
62+
# - images/a_dot_ham.jpeg
63+
64+
# An image asset can refer to one or more resolution-specific "variants", see
65+
# https://flutter.dev/assets-and-images/#resolution-aware.
66+
67+
# For details regarding adding assets from package dependencies, see
68+
# https://flutter.dev/assets-and-images/#from-packages
4169

70+
# To add custom fonts to your application, add a fonts section here,
71+
# in this "flutter" section. Each entry in this list should have a
72+
# "family" key with the font family name, and a "fonts" key with a
73+
# list giving the asset and other descriptors for the font. For
74+
# example:
75+
# fonts:
76+
# - family: Schyler
77+
# fonts:
78+
# - asset: fonts/Schyler-Regular.ttf
79+
# - asset: fonts/Schyler-Italic.ttf
80+
# style: italic
81+
# - family: Trajan Pro
82+
# fonts:
83+
# - asset: fonts/TrajanPro.ttf
84+
# - asset: fonts/TrajanPro_Bold.ttf
85+
# weight: 700
86+
#
87+
# For details regarding fonts from package dependencies,
88+
# see https://flutter.dev/custom-fonts/#from-packages

0 commit comments

Comments
 (0)