CustomSectionDto.fromJson constructor

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

Implementation

factory CustomSectionDto.fromJson(Map<String, dynamic> json) {
  return CustomSectionDto(
    position: decodeCustomSectionPositionDto(
        CustomSectionPositionDtoEnumMap, json["position"] as String),
    section: decodeCustomSectionTypeDto(
        CustomSectionTypeDtoEnumMap, json["section"] as String),
    title: json["title"] as String?,
    data: (json["data"] as List<dynamic>?)
        ?.map((e) =>
            CustomSectionDataBaseDto.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}