Open iskandarzhilmi opened 4 years ago
Use This code:-
` try { final newUser = await _auth.signInWithEmailAndPassword( email: email, password: password);
if (newUser != null) {
Navigator.pushReplacementNamed(context, ChatScreen.id);
}
} catch (e) {
setState(() {
showSpinner = false;
});
print(e);
}`
I've fixed it by writing the setState outsite of the try catch