Skip to content

Instantly share code, notes, and snippets.

@haroonkhan9426
Created May 27, 2020 15:17
Show Gist options
  • Save haroonkhan9426/29a9c10368e040ccfdbb8a5a8add3e4d to your computer and use it in GitHub Desktop.
Save haroonkhan9426/29a9c10368e040ccfdbb8a5a8add3e4d to your computer and use it in GitHub Desktop.
_createAccount() async {
final status = await FirebaseAuthHelper().createAccount(
email: email, pass: password);
if (status == AuthResultStatus.successful) {
// Navigate to success page
} else {
final errorMsg = AuthExceptionHandler.generateExceptionMessage(
status);
_showAlertDialog(errorMsg);
}
}
_login() async {
final status = await FirebaseAuthHelper().login(
email: email, pass: password);
if (status == AuthResultStatus.successful) {
// Navigate to success page
} else {
final errorMsg = AuthExceptionHandler.generateExceptionMessage(
status);
_showAlertDialog(errorMsg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment