import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/response/id_name_entity.dart'; IdNameEntity $IdNameEntityFromJson(Map json) { final IdNameEntity idNameEntity = IdNameEntity(); final String? id = jsonConvert.convert(json['id']); if (id != null) { idNameEntity.id = id; } final String? name = jsonConvert.convert(json['name']); if (name != null) { idNameEntity.name = name; } return idNameEntity; } Map $IdNameEntityToJson(IdNameEntity entity) { final Map data = {}; data['id'] = entity.id; data['name'] = entity.name; return data; } extension IdNameEntityExtension on IdNameEntity { IdNameEntity copyWith({ String? id, String? name, }) { return IdNameEntity() ..id = id ?? this.id ..name = name ?? this.name; } }