country_entity.g.dart 944 B

123456789101112131415161718192021222324252627
  1. import 'package:hengyi/generated/json/base/json_convert_content.dart';
  2. import 'package:hengyi/data/country_entity.dart';
  3. CountryEntity $CountryEntityFromJson(Map<String, dynamic> json) {
  4. final CountryEntity countryEntity = CountryEntity();
  5. final int? id = jsonConvert.convert<int>(json['id']);
  6. if (id != null) {
  7. countryEntity.id = id;
  8. }
  9. final String? countryName = jsonConvert.convert<String>(json['country_name']);
  10. if (countryName != null) {
  11. countryEntity.countryName = countryName;
  12. }
  13. final String? countryImgUrl = jsonConvert.convert<String>(json['country_img_url']);
  14. if (countryImgUrl != null) {
  15. countryEntity.countryImgUrl = countryImgUrl;
  16. }
  17. return countryEntity;
  18. }
  19. Map<String, dynamic> $CountryEntityToJson(CountryEntity entity) {
  20. final Map<String, dynamic> data = <String, dynamic>{};
  21. data['id'] = entity.id;
  22. data['country_name'] = entity.countryName;
  23. data['country_img_url'] = entity.countryImgUrl;
  24. return data;
  25. }