fromJson static method

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

Implementation

static AuthenticationCodeInfo? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return AuthenticationCodeInfo(
    phoneNumber: (json['phone_number'] as String?) ?? '',
    type: AuthenticationCodeType.fromJson(
        json['type'] as Map<String, dynamic>?)!,
    nextType: AuthenticationCodeType.fromJson(
        json['next_type'] as Map<String, dynamic>?),
    timeout: (json['timeout'] as int?) ?? 0,
  );
}