AttachmentCreateDTO.fromJson constructor

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

Implementation

factory AttachmentCreateDTO.fromJson(Map<String, Object?> json) {
  return AttachmentCreateDTO(
    additionalComment: json[r'additionalComment'] != null
        ? AdditionalCommentDTO.fromJson(
            json[r'additionalComment']! as Map<String, Object?>)
        : null,
    public: json[r'public'] as bool? ?? false,
    temporaryAttachmentIds:
        (json[r'temporaryAttachmentIds'] as List<Object?>?)
                ?.map((i) => i as String? ?? '')
                .toList() ??
            [],
  );
}