Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sirateek/96e811cc9881bc5206e251531ff774d9 to your computer and use it in GitHub Desktop.
Save sirateek/96e811cc9881bc5206e251531ff774d9 to your computer and use it in GitHub Desktop.
Future<bool> registerWithEmail(
{@required email, @required password, @required repassword}) {
final FirebaseAuth _auth = FirebaseAuth.instance;
return _auth
.createUserWithEmailAndPassword(email: email, password: password)
.then((data) {
print("Registation Success");
print(data.user.uid);
return true;
}).catchError((e) {
print("Error: " + e);
return false;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment