Skip to content

Instantly share code, notes, and snippets.

@adamcyber1
Created September 22, 2020 00:09
Show Gist options
  • Save adamcyber1/f00e6de73be3357600fcf99c20d343d2 to your computer and use it in GitHub Desktop.
Save adamcyber1/f00e6de73be3357600fcf99c20d343d2 to your computer and use it in GitHub Desktop.
Doogle Grive Logout Function
logout() async {
try {
Amplify.Auth.signOut();
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (context) => Login()));
} on AuthError catch (e) {
Alert(
context: context,
type: AlertType.error,
desc: "Error Logging Out: " + e.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment