flutter-chat-app
flutter-chat-app copied to clipboard
Running failed
Running "flutter packages get" in flutter-chat-app... The current Dart SDK version is 2.1.0-dev.3.1.flutter-760a9690c2.
Because flutter_chat_app depends on firebase_analytics 0.0.4 which requires SDK version >=1.8.0 <2.0.0, version solving failed. pub get failed (1)
Modify the file<pubspec.yaml> as follows:
dependencies:
flutter:
sdk: flutter
image_picker: 0.4.10
google_sign_in: 3.0.5
firebase_analytics: 1.0.3
firebase_auth: 0.5.20
firebase_database: 1.0.4
firebase_storage: 1.0.2
and Modify the file<ChatScreen.dart> as follows: line 56:
itemBuilder: (_, DataSnapshot messageSnapshot,
Animation<double> animation,int index) {
return new ChatMessageListItem(
messageSnapshot: messageSnapshot,
animation: animation,
);
},
line 125:
File imageFile = await ImagePicker.pickImage(source: null);
Please I did this but i still get errror
print the error message
@Princekap It's ok,test time: this time
new Flexible( child: new FirebaseAnimatedList( query: reference, padding: const EdgeInsets.all(8.0), reverse: true, sort: (a, b) => b.key.compareTo(a.key), //comparing timestamp of messages to check which one would appear first itemBuilder: (_, DataSnapshot messageSnapshot, Animation<double> animation,int index) { return new ChatMessageListItem( messageSnapshot: messageSnapshot, animation: animation, ); }, ), ),
it gives error The constructor returns type 'dynamic' that isn't of expected type 'widget'.