AuthenticationCodeInfo.fromJson constructor

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

Parses a AuthenticationCodeInfo from TDLib JSON.

Implementation

factory AuthenticationCodeInfo.fromJson(Map<String, dynamic> json) =>
    AuthenticationCodeInfo(
      phoneNumber: _readString(json['phone_number']),
      type: _readObject(json['type'], AuthenticationCodeType.fromJson),
      nextType:
          _readOptional(json['next_type'], AuthenticationCodeType.fromJson),
      timeout: _readInt(json['timeout']),
      extra: json['@extra'],
      clientId: _readClientId(json['@client_id']),
    );