-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Hi,
Im currently writing a sample project using FirebaseAuth. When looking at teh sourcecode I see:
/// Tries to create a new user account with the given email address and password.
///
/// If successful, it also signs the user in into the app and updates
/// the [onAuthStateChanged] stream.
///
/// Errors:
/// • `ERROR_WEAK_PASSWORD` - If the password is not strong enough.
/// • `ERROR_INVALID_EMAIL` - If the email address is malformed.
/// • `ERROR_EMAIL_ALREADY_IN_USE` - If the email is already in use by a different account.
Future<FirebaseUser> createUserWithEmailAndPassword({
@required String email,
@required String password,
}) async {
assert(email != null);
assert(password != null);
final Map<String, dynamic> data =
await channel.invokeMapMethod<String, dynamic>(
'createUserWithEmailAndPassword',
<String, String>{'email': email, 'password': password, 'app': app.name},
);
final FirebaseUser currentUser = FirebaseUser._(data, app);
return currentUser;
}My question is how are the named erros reported? The method only returns a FirebaseUser and no Exception is thrown in the function. What am I missing?
Thanks
Thomas
Metadata
Metadata
Assignees
Labels
No labels