Created
September 22, 2020 00:09
-
-
Save adamcyber1/f00e6de73be3357600fcf99c20d343d2 to your computer and use it in GitHub Desktop.
Doogle Grive Logout Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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