fromJson static method

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

Implementation

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

  return InputPassportElementError(
    type:
        PassportElementType.fromJson(json['type'] as Map<String, dynamic>?)!,
    message: (json['message'] as String?) ?? '',
    source: InputPassportElementErrorSource.fromJson(
        json['source'] as Map<String, dynamic>?)!,
  );
}