app_config_entity.g.dart
3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import 'package:wow_english/generated/json/base/json_convert_content.dart';
import 'package:wow_english/models/app_config_entity.dart';
AppConfigEntityEntity $AppConfigEntityEntityFromJson(
Map<String, dynamic> json) {
final AppConfigEntityEntity appConfigEntityEntity = AppConfigEntityEntity();
final bool? androidForceUpdate = jsonConvert.convert<bool>(
json['androidForceUpdate']);
if (androidForceUpdate != null) {
appConfigEntityEntity.androidForceUpdate = androidForceUpdate;
}
final bool? androidRecommendUpdate = jsonConvert.convert<bool>(
json['androidRecommendUpdate']);
if (androidRecommendUpdate != null) {
appConfigEntityEntity.androidRecommendUpdate = androidRecommendUpdate;
}
final String? androidUpdatePackageUrl = jsonConvert.convert<String>(
json['androidUpdatePackageUrl']);
if (androidUpdatePackageUrl != null) {
appConfigEntityEntity.androidUpdatePackageUrl = androidUpdatePackageUrl;
}
final int? androidVersion = jsonConvert.convert<int>(json['androidVersion']);
if (androidVersion != null) {
appConfigEntityEntity.androidVersion = androidVersion;
}
final bool? iosForceUpdate = jsonConvert.convert<bool>(
json['iosForceUpdate']);
if (iosForceUpdate != null) {
appConfigEntityEntity.iosForceUpdate = iosForceUpdate;
}
final bool? iosRecommendUpdate = jsonConvert.convert<bool>(
json['iosRecommendUpdate']);
if (iosRecommendUpdate != null) {
appConfigEntityEntity.iosRecommendUpdate = iosRecommendUpdate;
}
final int? iosVersion = jsonConvert.convert<int>(json['iosVersion']);
if (iosVersion != null) {
appConfigEntityEntity.iosVersion = iosVersion;
}
final String? noticeBeforePurchaseUrl = jsonConvert.convert<String>(
json['noticeBeforePurchaseUrl']);
if (noticeBeforePurchaseUrl != null) {
appConfigEntityEntity.noticeBeforePurchaseUrl = noticeBeforePurchaseUrl;
}
final String? safe = jsonConvert.convert<String>(json['safe']);
if (safe != null) {
appConfigEntityEntity.safe = safe;
}
return appConfigEntityEntity;
}
Map<String, dynamic> $AppConfigEntityEntityToJson(
AppConfigEntityEntity entity) {
final Map<String, dynamic> data = <String, dynamic>{};
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['noticeBeforePurchaseUrl'] = entity.noticeBeforePurchaseUrl;
data['safe'] = entity.safe;
return data;
}
extension AppConfigEntityEntityExtension on AppConfigEntityEntity {
AppConfigEntityEntity copyWith({
bool? androidForceUpdate,
bool? androidRecommendUpdate,
String? androidUpdatePackageUrl,
int? androidVersion,
bool? iosForceUpdate,
bool? iosRecommendUpdate,
int? iosVersion,
String? noticeBeforePurchaseUrl,
String? safe,
}) {
return AppConfigEntityEntity()
..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
..noticeBeforePurchaseUrl = noticeBeforePurchaseUrl ??
this.noticeBeforePurchaseUrl
..safe = safe ?? this.safe;
}
}