fromMap static method

AuthorizationState? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static AuthorizationState? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'authorizationStateWaitPassword':
      return AuthorizationStateWaitPassword.fromMap(_map);
    case 'authorizationStateReady':
      return AuthorizationStateReady.fromMap(_map);
    case 'authorizationStateWaitPhoneNumber':
      return AuthorizationStateWaitPhoneNumber.fromMap(_map);
    case 'authorizationStateWaitOtherDeviceConfirmation':
      return AuthorizationStateWaitOtherDeviceConfirmation.fromMap(_map);
    case 'authorizationStateClosed':
      return AuthorizationStateClosed.fromMap(_map);
    case 'authorizationStateWaitEmailCode':
      return AuthorizationStateWaitEmailCode.fromMap(_map);
    case 'authorizationStateWaitRegistration':
      return AuthorizationStateWaitRegistration.fromMap(_map);
    case 'authorizationStateLoggingOut':
      return AuthorizationStateLoggingOut.fromMap(_map);
    case 'authorizationStateClosing':
      return AuthorizationStateClosing.fromMap(_map);
    case 'authorizationStateWaitTdlibParameters':
      return AuthorizationStateWaitTdlibParameters.fromMap(_map);
    case 'authorizationStateWaitCode':
      return AuthorizationStateWaitCode.fromMap(_map);
    case 'authorizationStateWaitEmailAddress':
      return AuthorizationStateWaitEmailAddress.fromMap(_map);
    case null:
    default:
      return null;
  }
}