Closed utkarshshukla03 closed 1 year ago
I have the same problem too and don't know how to fix it
I have the same problem too and don't know how to fix it
@huutan3621 Did you got solution?
@huutan3621 @RivaanRanawat Please reply!!!!!
I have the same problem too and don't know how to fix it
@huutan3621 ????
Same as #12
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.