Skip to content

Instantly share code, notes, and snippets.

@duytq94
Last active March 24, 2020 11:56
Show Gist options
  • Select an option

  • Save duytq94/e881c8c7764d287ceb5cdc8ed2f78137 to your computer and use it in GitHub Desktop.

Select an option

Save duytq94/e881c8c7764d287ceb5cdc8ed2f78137 to your computer and use it in GitHub Desktop.
Future < Null > handleSignOut() async {
this.setState(() {
isLoading = true;
});
await FirebaseAuth.instance.signOut();
await googleSignIn.disconnect();
await googleSignIn.signOut();
this.setState(() {
isLoading = false;
});
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (context) => MyApp()),
(Route < dynamic > route) => false);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment