firebase logout user code example
Example 1: firebase auth get current user
var user = firebase.auth().currentUser;var name, email, photoUrl, uid, emailVerified;if (user != null) { name = user.displayName; email = user.email; photoUrl = user.photoURL; emailVerified = user.emailVerified; uid = user.uid;
Example 2: firebase sign out
Future<Null> _signOut() async {
await _auth.signOut();
this.setState(() {
isLoading = false;
});
Navigator.of(context).pushAndRemoveUntil(
MaterialPageRoute(builder: (context) => MyApp()),
(Route<dynamic> route) => false);
}