fromMap static method

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

Construct from Map.

Implementation

static AuthenticationCodeType? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'authenticationCodeTypeFirebaseAndroid':
      return AuthenticationCodeTypeFirebaseAndroid.fromMap(_map);
    case 'authenticationCodeTypeSms':
      return AuthenticationCodeTypeSms.fromMap(_map);
    case 'authenticationCodeTypeFragment':
      return AuthenticationCodeTypeFragment.fromMap(_map);
    case 'authenticationCodeTypeTelegramMessage':
      return AuthenticationCodeTypeTelegramMessage.fromMap(_map);
    case 'authenticationCodeTypeFirebaseIos':
      return AuthenticationCodeTypeFirebaseIos.fromMap(_map);
    case 'authenticationCodeTypeCall':
      return AuthenticationCodeTypeCall.fromMap(_map);
    case 'authenticationCodeTypeFlashCall':
      return AuthenticationCodeTypeFlashCall.fromMap(_map);
    case 'authenticationCodeTypeMissedCall':
      return AuthenticationCodeTypeMissedCall.fromMap(_map);
    case null:
    default:
      return null;
  }
}