import 'package:wow_english/generated/json/base/json_convert_content.dart'; import 'package:wow_english/models/app_config_entity.dart'; AppConfigEntity $AppConfigEntityFromJson(Map json) { final AppConfigEntity appConfigEntity = AppConfigEntity(); final bool? androidForceUpdate = jsonConvert.convert( json['androidForceUpdate']); if (androidForceUpdate != null) { appConfigEntity.androidForceUpdate = androidForceUpdate; } final bool? androidRecommendUpdate = jsonConvert.convert( json['androidRecommendUpdate']); if (androidRecommendUpdate != null) { appConfigEntity.androidRecommendUpdate = androidRecommendUpdate; } final String? androidUpdatePackageUrl = jsonConvert.convert( json['androidUpdatePackageUrl']); if (androidUpdatePackageUrl != null) { appConfigEntity.androidUpdatePackageUrl = androidUpdatePackageUrl; } final int? androidVersion = jsonConvert.convert(json['androidVersion']); if (androidVersion != null) { appConfigEntity.androidVersion = androidVersion; } final bool? iosForceUpdate = jsonConvert.convert( json['iosForceUpdate']); if (iosForceUpdate != null) { appConfigEntity.iosForceUpdate = iosForceUpdate; } final bool? iosRecommendUpdate = jsonConvert.convert( json['iosRecommendUpdate']); if (iosRecommendUpdate != null) { appConfigEntity.iosRecommendUpdate = iosRecommendUpdate; } final int? iosVersion = jsonConvert.convert(json['iosVersion']); if (iosVersion != null) { appConfigEntity.iosVersion = iosVersion; } final String? updatePackageDescription = jsonConvert.convert( json['updatePackageDescription']); if (updatePackageDescription != null) { appConfigEntity.updatePackageDescription = updatePackageDescription; } final String? noticeBeforePurchaseUrl = jsonConvert.convert( json['noticeBeforePurchaseUrl']); if (noticeBeforePurchaseUrl != null) { appConfigEntity.noticeBeforePurchaseUrl = noticeBeforePurchaseUrl; } final String? safe = jsonConvert.convert(json['safe']); if (safe != null) { appConfigEntity.safe = safe; } return appConfigEntity; } Map $AppConfigEntityToJson(AppConfigEntity entity) { final Map data = {}; data['androidForceUpdate'] = entity.androidForceUpdate; data['androidRecommendUpdate'] = entity.androidRecommendUpdate; data['androidUpdatePackageUrl'] = entity.androidUpdatePackageUrl; data['androidVersion'] = entity.androidVersion; data['iosForceUpdate'] = entity.iosForceUpdate; data['iosRecommendUpdate'] = entity.iosRecommendUpdate; data['iosVersion'] = entity.iosVersion; data['updatePackageDescription'] = entity.updatePackageDescription; data['noticeBeforePurchaseUrl'] = entity.noticeBeforePurchaseUrl; data['safe'] = entity.safe; return data; } extension AppConfigEntityExtension on AppConfigEntity { AppConfigEntity copyWith({ bool? androidForceUpdate, bool? androidRecommendUpdate, String? androidUpdatePackageUrl, int? androidVersion, bool? iosForceUpdate, bool? iosRecommendUpdate, int? iosVersion, String? updatePackageDescription, String? noticeBeforePurchaseUrl, String? safe, }) { return AppConfigEntity() ..androidForceUpdate = androidForceUpdate ?? this.androidForceUpdate ..androidRecommendUpdate = androidRecommendUpdate ?? this.androidRecommendUpdate ..androidUpdatePackageUrl = androidUpdatePackageUrl ?? this.androidUpdatePackageUrl ..androidVersion = androidVersion ?? this.androidVersion ..iosForceUpdate = iosForceUpdate ?? this.iosForceUpdate ..iosRecommendUpdate = iosRecommendUpdate ?? this.iosRecommendUpdate ..iosVersion = iosVersion ?? this.iosVersion ..updatePackageDescription = updatePackageDescription ?? this.updatePackageDescription ..noticeBeforePurchaseUrl = noticeBeforePurchaseUrl ?? this.noticeBeforePurchaseUrl ..safe = safe ?? this.safe; } }