import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/form_option_entity.dart'; FormOptionEntity $FormOptionEntityFromJson(Map json) { final FormOptionEntity formOptionEntity = FormOptionEntity(); final List? typeOfApplication = (json['type_of_application'] as List?)?.map( (e) => jsonConvert.convert(e) as String).toList(); if (typeOfApplication != null) { formOptionEntity.typeOfApplication = typeOfApplication; } final List? ownershipStatus = (json['ownership_status'] as List?)?.map( (e) => jsonConvert.convert(e) as String).toList(); if (ownershipStatus != null) { formOptionEntity.ownershipStatus = ownershipStatus; } return formOptionEntity; } Map $FormOptionEntityToJson(FormOptionEntity entity) { final Map data = {}; data['type_of_application'] = entity.typeOfApplication; data['ownership_status'] = entity.ownershipStatus; return data; } extension FormOptionEntityExtension on FormOptionEntity { FormOptionEntity copyWith({ List? typeOfApplication, List? ownershipStatus, }) { return FormOptionEntity() ..typeOfApplication = typeOfApplication ?? this.typeOfApplication ..ownershipStatus = ownershipStatus ?? this.ownershipStatus; } }