|
@@ -34,67 +34,65 @@ class Home extends BasicPage {
|
34
|
34
|
return Container(
|
35
|
35
|
decoration: const BoxDecoration(color: Colors.white),
|
36
|
36
|
padding: EdgeInsets.fromLTRB(15.w, 5.w, 15.w, 0),
|
37
|
|
- child: Column(
|
38
|
|
- children: [
|
39
|
|
- const searchBannerHeader(),
|
40
|
|
- Row(
|
41
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
37
|
+ child: RefreshMoreList(
|
|
38
|
+ pPrams: params,
|
|
39
|
+ cardText: '暂无农机',
|
|
40
|
+ fetch: getMachinery,
|
|
41
|
+ isHome: true,
|
|
42
|
+ useState: (state) {
|
|
43
|
+ machineryList(GetList(state));
|
|
44
|
+ },
|
|
45
|
+ builder: ({required BuildContext context, required Function toggle}) {
|
|
46
|
+ Refresh = toggle;
|
|
47
|
+ return Column(
|
42
|
48
|
children: [
|
43
|
|
- Container(
|
44
|
|
- padding: EdgeInsets.symmetric(vertical: 15.h),
|
45
|
|
- child: Row(
|
46
|
|
- children: [
|
47
|
|
- Padding(
|
48
|
|
- padding: const EdgeInsets.only(right: 8),
|
49
|
|
- child: Image(
|
50
|
|
- image:
|
51
|
|
- const AssetImage('images/icons/carsListImga.png'),
|
52
|
|
- fit: BoxFit.cover,
|
53
|
|
- width: 20.w,
|
54
|
|
- ),
|
|
49
|
+ const searchBannerHeader(),
|
|
50
|
+ Row(
|
|
51
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
52
|
+ children: [
|
|
53
|
+ Container(
|
|
54
|
+ padding: EdgeInsets.symmetric(vertical: 15.h),
|
|
55
|
+ child: Row(
|
|
56
|
+ children: [
|
|
57
|
+ Padding(
|
|
58
|
+ padding: const EdgeInsets.only(right: 8),
|
|
59
|
+ child: Image(
|
|
60
|
+ image: const AssetImage(
|
|
61
|
+ 'images/icons/carsListImga.png'),
|
|
62
|
+ fit: BoxFit.cover,
|
|
63
|
+ width: 20.w,
|
|
64
|
+ ),
|
|
65
|
+ ),
|
|
66
|
+ Text(
|
|
67
|
+ '农机列表',
|
|
68
|
+ style: TextStyle(
|
|
69
|
+ color: const Color(0xff222222),
|
|
70
|
+ fontSize: 20.sp,
|
|
71
|
+ fontWeight: FontWeight.bold),
|
|
72
|
+ )
|
|
73
|
+ ],
|
55
|
74
|
),
|
56
|
|
- Text(
|
57
|
|
- '农机列表',
|
58
|
|
- style: TextStyle(
|
59
|
|
- color: const Color(0xff222222),
|
60
|
|
- fontSize: 20.sp,
|
61
|
|
- fontWeight: FontWeight.bold),
|
62
|
|
- )
|
63
|
|
- ],
|
|
75
|
+ ),
|
|
76
|
+ GestureDetector(
|
|
77
|
+ child: const Text('更多 >>'),
|
|
78
|
+ onTap: () {
|
|
79
|
+ Get.to(const MoreCars());
|
|
80
|
+ },
|
|
81
|
+ )
|
|
82
|
+ ],
|
|
83
|
+ ),
|
|
84
|
+ Obx(
|
|
85
|
+ () => Column(
|
|
86
|
+ children: machineryList.value
|
|
87
|
+ .map(
|
|
88
|
+ (item) => CarsCard(item: item),
|
|
89
|
+ )
|
|
90
|
+ .toList(),
|
64
|
91
|
),
|
65
|
92
|
),
|
66
|
|
- GestureDetector(
|
67
|
|
- child: const Text('更多 >>'),
|
68
|
|
- onTap: () {
|
69
|
|
- Get.to(const MoreCars());
|
70
|
|
- },
|
71
|
|
- )
|
72
|
93
|
],
|
73
|
|
- ),
|
74
|
|
- Expanded(
|
75
|
|
- child: RefreshMoreList(
|
76
|
|
- pPrams: params,
|
77
|
|
- cardText: '暂无农机',
|
78
|
|
- fetch: getMachinery,
|
79
|
|
- useState: (state) {
|
80
|
|
- machineryList(GetList(state));
|
81
|
|
- },
|
82
|
|
- builder: (
|
83
|
|
- {required BuildContext context, required Function toggle}) {
|
84
|
|
- Refresh = toggle;
|
85
|
|
- return Obx(
|
86
|
|
- () => Column(
|
87
|
|
- children: machineryList.value
|
88
|
|
- .map(
|
89
|
|
- (item) => CarsCard(item: item),
|
90
|
|
- )
|
91
|
|
- .toList(),
|
92
|
|
- ),
|
93
|
|
- );
|
94
|
|
- },
|
95
|
|
- ),
|
96
|
|
- ),
|
97
|
|
- ],
|
|
94
|
+ );
|
|
95
|
+ },
|
98
|
96
|
),
|
99
|
97
|
);
|
100
|
98
|
}
|