


# SignInWithEmailAndPasswordFailureFirebase.fromCode constructor




    *[<Null safety>](https://dart.dev/null-safety)*



SignInWithEmailAndPasswordFailureFirebase.fromCode([String](https://api.flutter.dev/flutter/dart-core/String-class.html) code)





## Implementation

```dart
SignInWithEmailAndPasswordFailureFirebase.fromCode(String code)
    : super.fromCode(code) {
  switch (code) {
    case 'invalid-email':
      msg = 'Email is not valid or badly formatted.';
      break;
    case 'user-disabled':
      msg = 'This user has been disabled. Please contact support for help.';
      break;
    case 'user-not-found':
      msg = 'Email is not found, please create an account.';
      break;
    case 'wrong-password':
      msg = 'Incorrect password, please try again.';
      break;
    default:
      this.code = 'unknown';
      msg = 'An unknown error occurred.';
  }
}
```







