captcha_img_entity.g.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import 'package:domain/generated/json/base/json_convert_content.dart';
  2. import 'package:domain/entity/captcha_img_entity.dart';
  3. CaptchaImgEntity $CaptchaImgEntityFromJson(Map<String, dynamic> json) {
  4. final CaptchaImgEntity captchaImgEntity = CaptchaImgEntity();
  5. final bool? sensitive = jsonConvert.convert<bool>(json['sensitive']);
  6. if (sensitive != null) {
  7. captchaImgEntity.sensitive = sensitive;
  8. }
  9. final String? key = jsonConvert.convert<String>(json['key']);
  10. if (key != null) {
  11. captchaImgEntity.key = key;
  12. }
  13. final String? img = jsonConvert.convert<String>(json['img']);
  14. if (img != null) {
  15. captchaImgEntity.img = img;
  16. }
  17. return captchaImgEntity;
  18. }
  19. Map<String, dynamic> $CaptchaImgEntityToJson(CaptchaImgEntity entity) {
  20. final Map<String, dynamic> data = <String, dynamic>{};
  21. data['sensitive'] = entity.sensitive;
  22. data['key'] = entity.key;
  23. data['img'] = entity.img;
  24. return data;
  25. }
  26. extension CaptchaImgEntityExtension on CaptchaImgEntity {
  27. CaptchaImgEntity copyWith({
  28. bool? sensitive,
  29. String? key,
  30. String? img,
  31. }) {
  32. return CaptchaImgEntity()
  33. ..sensitive = sensitive ?? this.sensitive
  34. ..key = key ?? this.key
  35. ..img = img ?? this.img;
  36. }
  37. }