AuthenticationCodeType.fromJson constructor

AuthenticationCodeType.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AuthenticationCodeType.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case AuthenticationCodeTypeTelegramMessage.CONSTRUCTOR:
      return AuthenticationCodeTypeTelegramMessage.fromJson(json);
    case AuthenticationCodeTypeSms.CONSTRUCTOR:
      return AuthenticationCodeTypeSms.fromJson(json);
    case AuthenticationCodeTypeCall.CONSTRUCTOR:
      return AuthenticationCodeTypeCall.fromJson(json);
    case AuthenticationCodeTypeFlashCall.CONSTRUCTOR:
      return AuthenticationCodeTypeFlashCall.fromJson(json);
    case AuthenticationCodeTypeMissedCall.CONSTRUCTOR:
      return AuthenticationCodeTypeMissedCall.fromJson(json);
    default:
      return const AuthenticationCodeType();
  }
}