RequestTypeFieldDTO.fromJson constructor

RequestTypeFieldDTO.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory RequestTypeFieldDTO.fromJson(Map<String, Object?> json) {
  return RequestTypeFieldDTO(
    defaultValues: (json[r'defaultValues'] as List<Object?>?)
            ?.map((i) => RequestTypeFieldValueDTO.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    description: json[r'description'] as String?,
    fieldId: json[r'fieldId'] as String?,
    jiraSchema: json[r'jiraSchema'] != null
        ? JsonTypeBean.fromJson(json[r'jiraSchema']! as Map<String, Object?>)
        : null,
    name: json[r'name'] as String?,
    presetValues: (json[r'presetValues'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    required: json[r'required'] as bool? ?? false,
    validValues: (json[r'validValues'] as List<Object?>?)
            ?.map((i) => RequestTypeFieldValueDTO.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    visible: json[r'visible'] as bool? ?? false,
  );
}