app_config_entity.g.dart
1.47 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
import 'package:wow_english/generated/json/base/json_convert_content.dart';
import 'package:wow_english/models/app_config_entity.dart';
AppConfigEntity $AppConfigEntityFromJson(Map<String, dynamic> json) {
final AppConfigEntity appConfigEntity = AppConfigEntity();
final String? safe = jsonConvert.convert<String>(json['safe']);
if (safe != null) {
appConfigEntity.safe = safe;
}
final List<String>? customerMobileList =
(json['customerMobileList'] as List<dynamic>?)
?.map((e) => jsonConvert.convert<String>(e) as String)
.toList();
if (customerMobileList != null) {
appConfigEntity.customerMobileList = customerMobileList;
}
final String? customerQr = jsonConvert.convert<String>(json['customerQr']);
if (customerQr != null) {
appConfigEntity.customerQr = customerQr;
}
return appConfigEntity;
}
Map<String, dynamic> $AppConfigEntityToJson(AppConfigEntity entity) {
final Map<String, dynamic> data = <String, dynamic>{};
data['safe'] = entity.safe;
data['customerMobileList'] = entity.customerMobileList;
data['customerQr'] = entity.customerQr;
return data;
}
extension AppConfigEntityExtension on AppConfigEntity {
AppConfigEntity copyWith({
String? safe,
List<String>? customerMobileList,
String? customerQr,
}) {
return AppConfigEntity()
..safe = safe ?? this.safe
..customerMobileList = customerMobileList ?? this.customerMobileList
..customerQr = customerQr ?? this.customerQr;
}
}