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