cookbook_one_model.g.dart
3.22 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'cookbook_one_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
CookbookOneModel _$CookbookOneModelFromJson(Map<String, dynamic> json) {
return CookbookOneModel(
json['ret'] as int?,
json['data'] == null
? null
: Data.fromJson(json['data'] as Map<String, dynamic>),
json['msg'] as String?,
);
}
Map<String, dynamic> _$CookbookOneModelToJson(CookbookOneModel instance) =>
<String, dynamic>{
'ret': instance.ret,
'data': instance.data,
'msg': instance.msg,
};
Data _$DataFromJson(Map<String, dynamic> json) {
return Data(
json['data'] == null
? null
: CookbookOneSunModel.fromJson(json['data'] as Map<String, dynamic>),
);
}
Map<String, dynamic> _$DataToJson(Data instance) => <String, dynamic>{
'data': instance.data,
};
CookbookOneSunModel _$CookbookOneSunModelFromJson(Map<String, dynamic> json) {
return CookbookOneSunModel(
json['id'] as String?,
json['sellerid'] as String?,
json['cid'] as String?,
json['unit'] as String?,
json['name'] as String?,
json['price'] as String?,
json['first_name'] as String?,
json['channel'] as String?,
json['status'] as String?,
json['give'] as String?,
json['image'] as String?,
json['order_o'] as String?,
json['cdate'] as String?,
json['class_name'] as String?,
json['class_order'] as String?,
json['attr'] as List?,
(json['spec'] as List?)
?.map((e) =>
e == null ? null : SpecModel.fromJson(e as Map<String, dynamic>))
.toList(),
(json['practice'] as List?)
?.map((e) => e == null
? null
: PracticeModel.fromJson(e as Map<String, dynamic>))
.toList(),
json['taste'] as String?,
json['cooks'] as String?,
json['cook_style'] == null
? null
: DishCookStyle.fromJson(convert.json.decode(json['cook_style'])),
json['desc'] as String?,
);
}
Map<String, dynamic> _$CookbookOneSunModelToJson(
CookbookOneSunModel instance) =>
<String, dynamic>{
'id': instance.id,
'sellerid': instance.sellerid,
'cid': instance.cid,
'unit': instance.unit,
'name': instance.name,
'price': instance.price,
'first_name': instance.firstName,
'channel': instance.channel,
'status': instance.status,
'give': instance.give,
'image': instance.image,
'order_o': instance.orderO,
'cdate': instance.cdate,
'class_name': instance.className,
'class_order': instance.classOrder,
'attr': instance.attr,
'spec': instance.spec,
'practice': instance.practice,
'taste': instance.taste,
'cooks': instance.cooks,
'cook_style': instance.cookStyle,
'desc': instance.desc
// 'template': instance.template,
};
// Template _$TemplateFromJson(Map<String, dynamic> json) {
// return Template(
// json['templateid'] as String,
// );
// }
// Map<String, dynamic> _$TemplateToJson(Template instance) => <String, dynamic>{
// 'templateid': instance.templateid,
// };