fromJson static method

AuthenticationFailReason fromJson(
  1. int index
)

Implementation

static AuthenticationFailReason fromJson(int index) {
  switch (index) {
    case 0:
      return invalidCredentials;
    case 1:
      return userCreationDenied;
    case 2:
      return internalError;
    case 3:
      return tooManyFailedAttempts;
    case 4:
      return blocked;
    default:
      throw ArgumentError(
          'Value "$index" cannot be converted to "AuthenticationFailReason"');
  }
}