country_entity.g.dart 971 B

12345678910111213141516171819202122232425262728
  1. import 'package:fuwei/generated/json/base/json_convert_content.dart';
  2. import 'package:fuwei/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 =
  14. jsonConvert.convert<String>(json['country_img_url']);
  15. if (countryImgUrl != null) {
  16. countryEntity.countryImgUrl = countryImgUrl;
  17. }
  18. return countryEntity;
  19. }
  20. Map<String, dynamic> $CountryEntityToJson(CountryEntity entity) {
  21. final Map<String, dynamic> data = <String, dynamic>{};
  22. data['id'] = entity.id;
  23. data['country_name'] = entity.countryName;
  24. data['country_img_url'] = entity.countryImgUrl;
  25. return data;
  26. }