import 'package:hengyi/generated/json/base/json_convert_content.dart'; import 'package:hengyi/data/country_entity.dart'; CountryEntity $CountryEntityFromJson(Map json) { final CountryEntity countryEntity = CountryEntity(); final int? id = jsonConvert.convert(json['id']); if (id != null) { countryEntity.id = id; } final String? countryName = jsonConvert.convert(json['country_name']); if (countryName != null) { countryEntity.countryName = countryName; } final String? countryImgUrl = jsonConvert.convert(json['country_img_url']); if (countryImgUrl != null) { countryEntity.countryImgUrl = countryImgUrl; } return countryEntity; } Map $CountryEntityToJson(CountryEntity entity) { final Map data = {}; data['id'] = entity.id; data['country_name'] = entity.countryName; data['country_img_url'] = entity.countryImgUrl; return data; }