-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type 'Null' is not a subtype of type 'String' #16
Comments
I have the same problem too and don't know how to fix it |
@huutan3621 |
@huutan3621 @RivaanRanawat |
@huutan3621 ???? |
Same as #12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error showing in debug console
E/flutter ( 9425): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
E/flutter ( 9425): #0 User.fromSnap
package:insta_clone/models/user.dart:26
E/flutter ( 9425): #1 AuthMethods.getUserDetails
package:insta_clone/resources/auth_methods.dart:19
E/flutter ( 9425):
E/flutter ( 9425): #2 UserProvider.refreshUser
package:insta_clone/providers/user_provider.dart:13
E/flutter ( 9425):
E/flutter ( 9425): #3 _ResponsiveLayoutState.addData
package:insta_clone/responsive/responsive_layout.dart:28
E/flutter ( 9425):
From user.dart
static User fromSnap(DocumentSnapshot snap) {
var snapshot = snap.data() as Map<String, dynamic>;
return User(
username: snapshot['username'],
uid: snapshot['uid'],
email: snapshot['email'],
photoUrl: snapshot['photoUrl'], (error putting here on ['photoUrl')
followers: snapshot['followers'],
following: snapshot['following'],
);
}
From auth_methods.dart
DocumentSnapshot documentSnapshot =
await _firestore.collection('users').doc(currentUser.uid).get();
}
please help stuck here from last 1 week, i have tried solutions to solve that red screen problem, but after that it just showing cirular progess indicator, i have deleted users from database but after that too its showing errors.
The text was updated successfully, but these errors were encountered: