fromJson static method

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

Implementation

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

  return PassportRequiredElement(
    suitableElements: List<PassportSuitableElement>.from(
      tdListFromJson(json['suitable_elements'])
          .map(
            (item) => PassportSuitableElement.fromJson(tdMapFromJson(item)),
          )
          .whereType<PassportSuitableElement>(),
    ),
  );
}