I'm trying to upload a snackBar in case of error but nothing appears on the screen, neither error nor the snackBar
onFail doesn't work !
class UserManager {
final FirebaseAuth auth = FirebaseAuth.instance;
Future<void> signIn({required UserPerson userPerson, required Function onFail, required Function onSuccess}) async {
try {
final UserCredential credential = await auth.signInWithEmailAndPassword(email: userPerson.email, password: userPerson.password);
onSuccess();
}
on PlatformException catch (e) {
onFail(getErrorString(e.code));
}
}
}