I'm having a bit of trouble catching errors from firebase authentication instances in flutter , I don't know what is wrong the code still throws exceptions even though i'm catching the errors , In addition , I have no idea how to identify the exception type whether its a badly formatted email , email already in use , weak password , etc.... and there is no proper documentation for such thing
I have tried this:
FirebaseAuth.instance.createUserWithEmailAndPassword(
email: _email, password: _password)
.then((currentUser) => {
//Execute
}).catchError((onError)=>{
print(onError)
});
And tried a simple try-catch block and none of them catch the exception