1
1
import 'dart:convert' show json;
2
2
3
3
class ListsResp {
4
-
5
4
List <List <List <int >>> asd;
6
5
List <int > qaz;
7
6
List <List <List <Zxc >>> qwe;
8
7
9
8
ListsResp .fromParams ({this .asd, this .qaz, this .qwe});
10
9
11
- factory ListsResp (jsonStr) => jsonStr == null ? null : jsonStr is String ? new ListsResp .fromJson (json.decode (jsonStr)) : new ListsResp .fromJson (jsonStr);
10
+ factory ListsResp (jsonStr) => jsonStr == null
11
+ ? null
12
+ : jsonStr is String
13
+ ? ListsResp .fromJson (json.decode (jsonStr))
14
+ : ListsResp .fromJson (jsonStr);
12
15
13
16
ListsResp .fromJson (jsonRes) {
14
17
asd = jsonRes['asd' ] == null ? null : [];
15
18
16
- for (var asdItem in asd == null ? [] : jsonRes['asd' ]){
17
- List <List <int >> asdChild = asdItem == null ? null : [];
18
- for (var asdItemItem in asdChild == null ? [] : asdItem){
19
- List <int > asdChildChild = asdItemItem == null ? null : [];
20
- for (var asdItemItemItem in asdChildChild == null ? [] : asdItemItem){
21
- asdChildChild.add (asdItemItemItem);
22
- }
23
- asdChild.add (asdChildChild);
24
- }
19
+ for (var asdItem in asd == null ? [] : jsonRes['asd' ]) {
20
+ List <List <int >> asdChild = asdItem == null ? null : [];
21
+ for (var asdItemItem in asdChild == null ? [] : asdItem) {
22
+ List <int > asdChildChild = asdItemItem == null ? null : [];
23
+ for (var asdItemItemItem in asdChildChild == null ? [] : asdItemItem) {
24
+ asdChildChild.add (asdItemItemItem);
25
+ }
26
+ asdChild.add (asdChildChild);
27
+ }
25
28
asd.add (asdChild);
26
29
}
27
30
28
31
qaz = jsonRes['qaz' ] == null ? null : [];
29
32
30
- for (var qazItem in qaz == null ? [] : jsonRes['qaz' ]){
31
- qaz.add (qazItem);
33
+ for (var qazItem in qaz == null ? [] : jsonRes['qaz' ]) {
34
+ qaz.add (qazItem);
32
35
}
33
36
34
37
qwe = jsonRes['qwe' ] == null ? null : [];
35
38
36
- for (var qweItem in qwe == null ? [] : jsonRes['qwe' ]){
37
- List <List <Zxc >> qweChild = qweItem == null ? null : [];
38
- for (var qweItemItem in qweChild == null ? [] : qweItem){
39
- List <Zxc > qweChildChild = qweItemItem == null ? null : [];
40
- for (var qweItemItemItem in qweChildChild == null ? [] : qweItemItem){
41
- qweChildChild.add (qweItemItemItem == null ? null : new Zxc .fromJson (qweItemItemItem));
42
- }
43
- qweChild.add (qweChildChild);
44
- }
39
+ for (var qweItem in qwe == null ? [] : jsonRes['qwe' ]) {
40
+ List <List <Zxc >> qweChild = qweItem == null ? null : [];
41
+ for (var qweItemItem in qweChild == null ? [] : qweItem) {
42
+ List <Zxc > qweChildChild = qweItemItem == null ? null : [];
43
+ for (var qweItemItemItem in qweChildChild == null ? [] : qweItemItem) {
44
+ qweChildChild.add (
45
+ qweItemItemItem == null ? null : Zxc .fromJson (qweItemItemItem));
46
+ }
47
+ qweChild.add (qweChildChild);
48
+ }
45
49
qwe.add (qweChild);
46
50
}
47
51
}
48
52
49
53
@override
50
54
String toString () {
51
- return '{"asd": $asd ,"qaz": $qaz ,"qwe": $qwe }' ;
55
+ return '{"asd": $asd , "qaz": $qaz , "qwe": $qwe }' ;
52
56
}
53
57
}
54
58
55
59
class Zxc {
56
-
57
60
int zxc;
58
61
59
62
Zxc .fromParams ({this .zxc});
@@ -67,4 +70,3 @@ class Zxc {
67
70
return '{"zxc": $zxc }' ;
68
71
}
69
72
}
70
-
0 commit comments