Error Handling
class CustomErrorMessage extends Email {
CustomErrorMessage({@required EmailConfig config}) : super(config: config);
@override
String errMsg(e, bool isFirebaseException, FirebaseExceptionData fe) {
if (isFirebaseException) {
switch (fe.code) {
case 'user-not-found':
// Default message is 'There is no user record corresponding to this identifier. Please create an account'
// We change it to 'Please create an Account'
return 'Please create an account';
break;
default:
}
}
return null;
}
}Last updated