onPressed: () async {
if(_formKey.currentState.validate()){
setState(() => loading = true);
dynamic result = await _auth.signInWithEmailAndPassword(email, password);
if(result == null) {
setState(() {
loading = false;
error = 'Could not sign in with those credentials';
});
}
}
}
The setState for loading = false is never called. Although I set the breakpoint in signInWithEmailAndPassword, it did return null. What could be the reason? Thanks.
The code:
The
setState
forloading = false
is never called. Although I set the breakpoint insignInWithEmailAndPassword
, it did returnnull
. What could be the reason? Thanks.