flutter_firebase_auth_example
flutter_firebase_auth_example copied to clipboard
Showing Error
Why is this line of code showing error : FirebaseUser user = await FirebaseAuth.instance .createUserWithEmailAndPassword(email: email, password: password);
???
I catch that as well, I think it should be: FirebaseAuth user = await FirebaseAuth.instance .createUserWithEmailAndPassword(email: email, password: password);
I'm also still analysing this repo. Please lemme know how it goes. Thanks!
Replace the signUp function with the following:
static Future<String> signUp(String email, String password) async { final user = (await FirebaseAuth.instance .createUserWithEmailAndPassword(email: email, password: password)).user; return user.uid; }
The error is being made due to updates to firebase that changed the Type of .createUserWithEmailAndPassword from FirebaseUser to Type AuthResult