Check if the user is logged in Flutter & firebase auth |
That didn't work for me so this is what I did:
FirebaseAuth.instance.currentUser().then((firebaseUser){
if(firebaseUser == null)
{
//signed out
}
else{
//signed in
}
});
Use the currentUser()
method:
if (await FirebaseAuth.instance.currentUser() != null) {
// signed in
} else {
}