mac 2 years ago
parent
commit
83c4fd0a74

+ 1
- 2
ios/Runner.xcodeproj/project.pbxproj View File

@@ -3,7 +3,7 @@
3 3
 	archiveVersion = 1;
4 4
 	classes = {
5 5
 	};
6
-	objectVersion = 50;
6
+	objectVersion = 51;
7 7
 	objects = {
8 8
 
9 9
 /* Begin PBXBuildFile section */
@@ -76,7 +76,6 @@
76 76
 				805A6DB5EC13EB9FC8C0F263 /* Pods-Runner.release.xcconfig */,
77 77
 				E4D5DB9E3D4475D04602FE2B /* Pods-Runner.profile.xcconfig */,
78 78
 			);
79
-			name = Pods;
80 79
 			path = Pods;
81 80
 			sourceTree = "<group>";
82 81
 		};

+ 10
- 0
ios/Runner/Info.plist View File

@@ -28,6 +28,8 @@
28 28
 	<string>LaunchScreen</string>
29 29
 	<key>UIMainStoryboardFile</key>
30 30
 	<string>Main</string>
31
+	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
32
+	<string>需要您提供定位信息,才能使用获取您附近的农机</string>
31 33
 	<key>UISupportedInterfaceOrientations</key>
32 34
 	<array>
33 35
 		<string>UIInterfaceOrientationPortrait</string>
@@ -45,5 +47,13 @@
45 47
 	<false/>
46 48
 	<key>CADisableMinimumFrameDurationOnPhone</key>
47 49
 	<true/>
50
+	<key>io.flutter.embedded_views_preview</key>
51
+	<string>YES</string>	
52
+	<key>NSLocationAlwaysUsageDescription</key>
53
+	<string>需要您提供后台定位信息,才能使用获取您附近的农机</string>
54
+	<key>NSLocationUsageDescription</key>
55
+	<string>需要您提供定位信息,才能使用获取您附近的农机</string>
56
+	<key>NSLocationWhenInUseUsageDescription</key>
57
+	<string>需要您提供定位信息,才能使用获取您附近的农机</string>
48 58
 </dict>
49 59
 </plist>

+ 16
- 16
lib/pages/OrderConfirmation/index.dart View File

@@ -3,14 +3,12 @@ import 'package:farmer_client/models/app.dart';
3 3
 import 'package:farmer_client/models/entities/CardInfo.dart';
4 4
 import 'package:farmer_client/widgets/layout/BasicPage.dart';
5 5
 import 'package:flutter/material.dart';
6
-import 'package:flutter/services.dart';
7 6
 import 'package:flutter_easyloading/flutter_easyloading.dart';
8 7
 import 'package:flutter_screenutil/flutter_screenutil.dart';
9 8
 import 'package:fluttertoast/fluttertoast.dart';
10 9
 import 'package:get/get.dart';
11 10
 import 'package:intl/intl.dart';
12 11
 
13
-import '../../models/entities/CardListModel.dart';
14 12
 import '../../models/entities/OrderInfoModel.dart';
15 13
 import '../../services/homeAPI.dart';
16 14
 import '../../services/orderAPI.dart';
@@ -32,19 +30,19 @@ class OrderConfirmation extends BasicPage {
32 30
     super.beforeShow();
33 31
     if (Get.arguments['item'] != null) {
34 32
       item(Get.arguments['item']);
35
-    } else {
33
+    } else if (Get.arguments['id'] != null) {
36 34
       markId = Get.arguments['id'];
37 35
       EasyLoading.show(status: '数据加载中...');
38
-
39
-      getMachineryInfo(markId, appController.locationStr, true)
36
+      //苹果模拟器看不到定位所以加一个默认定位是邓州市中心位置
37
+      getMachineryInfo(Get.arguments['id'],
38
+              appController.locationStr ?? '112.091892,32.690712', true)
40 39
           .then((value) {
41 40
         item(CardInfo.fromJson(value));
42 41
         EasyLoading.dismiss();
42
+      }).catchError((error) {
43
+        EasyLoading.dismiss();
44
+        Fluttertoast.showToast(msg: error.error['message']);
43 45
       });
44
-
45
-      // item(CardInfo.fromJson(Get.arguments['item']));
46
-
47
-      return;
48 46
     }
49 47
   }
50 48
 
@@ -69,7 +67,7 @@ class OrderConfirmation extends BasicPage {
69 67
         orderInfo(OrderInfoModel.fromJson(value));
70 68
         Fluttertoast.showToast(msg: '预约成功');
71 69
         Get.offNamed('/orderPageInfo', arguments: {
72
-          'id': orderInfo().orderId,
70
+          'orderId': value['orderId'],
73 71
           'title': '待付款',
74 72
           'styleColor': Color(0xFF51D4FF)
75 73
         });
@@ -81,7 +79,7 @@ class OrderConfirmation extends BasicPage {
81 79
   @override
82 80
   Widget builder(BuildContext context) {
83 81
     naviTitle = '预约';
84
-    return Container(
82
+    return SizedBox(
85 83
       height: 700.h,
86 84
       child: Form(
87 85
         key: _formKey, //设置globalKey,用于后面获取FormState
@@ -174,7 +172,8 @@ class OrderConfirmation extends BasicPage {
174 172
                           child: Obx(
175 173
                             () => Text(selectDate == null
176 174
                                 ? '请选择日期'
177
-                                : DateFormat("yyyy-MM-dd").format(selectDate())),
175
+                                : DateFormat("yyyy-MM-dd")
176
+                                    .format(selectDate())),
178 177
                           )),
179 178
                     )
180 179
                   ],
@@ -212,8 +211,9 @@ class OrderConfirmation extends BasicPage {
212 211
                       padding: const EdgeInsets.fromLTRB(10, 0, 0, 0),
213 212
                       child: GestureDetector(
214 213
                         onTap: () {
215
-                          Get.toNamed('/addressList',
216
-                              arguments: {'isBack': true});
214
+                          Get.toNamed('/addressList', arguments: {
215
+                            'isBack': true,
216
+                          });
217 217
                         },
218 218
                         child: SizedBox(
219 219
                           width: 290.w,
@@ -277,8 +277,8 @@ class OrderConfirmation extends BasicPage {
277 277
                         fontWeight: FontWeight.bold),
278 278
                   ),
279 279
                   style: ButtonStyle(
280
-                    side: MaterialStateProperty.all(
281
-                        const BorderSide(width: 1, color: Color(0xFFFF703B))), //边框
280
+                    side: MaterialStateProperty.all(const BorderSide(
281
+                        width: 1, color: Color(0xFFFF703B))), //边框
282 282
                     elevation: MaterialStateProperty.all(0),
283 283
                     backgroundColor: MaterialStateProperty.all(Colors.white),
284 284
                     shape: MaterialStateProperty.all(

+ 10
- 8
lib/pages/addressList/index.dart View File

@@ -58,13 +58,13 @@ class AddressList extends BasicPage {
58 58
         ),
59 59
         onCancel: () => true,
60 60
         onConfirm: () {
61
-              addressDelete(id).then((value) {
62
-                List<Address> list = addressController.addressList.value.toList();
63
-                list.removeWhere((element) => element.addressId == id);
64
-                addressController.addressList(list);
65
-                Fluttertoast.showToast(msg: '删除成功!');
66
-              });
67
-            });
61
+          addressDelete(id).then((value) {
62
+            List<Address> list = addressController.addressList.value.toList();
63
+            list.removeWhere((element) => element.addressId == id);
64
+            addressController.addressList(list);
65
+            Fluttertoast.showToast(msg: '删除成功!');
66
+          });
67
+        });
68 68
   }
69 69
 
70 70
   Widget buildList() {
@@ -97,7 +97,9 @@ class AddressList extends BasicPage {
97 97
         );
98 98
       }).toList();
99 99
 
100
-      return Column(children: children,);
100
+      return Column(
101
+        children: children,
102
+      );
101 103
     });
102 104
   }
103 105
 

+ 164
- 157
lib/pages/login/login.dart View File

@@ -1,9 +1,7 @@
1 1
 import 'dart:async';
2
-import 'dart:ffi';
3 2
 import 'package:farmer_client/models/app.dart';
4 3
 import 'package:farmer_client/pages/home/index.dart';
5 4
 import 'package:fluttertoast/fluttertoast.dart';
6
-import 'package:flutter/gestures.dart';
7 5
 import 'package:flutter/material.dart';
8 6
 import 'package:flutter_screenutil/flutter_screenutil.dart';
9 7
 import 'package:get/get.dart';
@@ -92,7 +90,7 @@ class _RouteLogin extends State<MyRouteLogin> {
92 90
     });
93 91
   }
94 92
 
95
-  //登按钮
93
+  //登按钮
96 94
   void _handelSubmit() {
97 95
     if (handleCodes == '' || handlePhones == '') {
98 96
       Fluttertoast.showToast(msg: '请输入验证码或手机号!');
@@ -126,99 +124,53 @@ class _RouteLogin extends State<MyRouteLogin> {
126 124
               fit: BoxFit.cover,
127 125
             ),
128 126
           ),
129
-          child: Container(
130
-            child: ListView(
131
-              // mainAxisAlignment: MainAxisAlignment.end,
132
-              // crossAxisAlignment: CrossAxisAlignment.start,
133
-              children: [
134
-                Padding(
135
-                  padding: EdgeInsets.fromLTRB(15, 0, 0, 5),
136
-                  child: const Text(
137
-                    '您好!',
127
+          child: ListView(
128
+            children: [
129
+              SizedBox(
130
+                height: 44.w,
131
+                child: Center(
132
+                  child: Text(
133
+                    '登录',
138 134
                     style: TextStyle(
135
+                      letterSpacing: 3,
139 136
                       fontWeight: FontWeight.bold,
140
-                      fontSize: 33,
137
+                      color: const Color(0xFF333333),
138
+                      fontSize: 17.sp,
141 139
                     ),
142 140
                   ),
143 141
                 ),
144
-                Padding(
145
-                  padding: EdgeInsets.fromLTRB(15, 0, 0, 0),
146
-                  child: const Text(
147
-                    '欢迎进入农户端应用!',
148
-                    style: TextStyle(
149
-                      fontWeight: FontWeight.bold,
150
-                      fontSize: 27,
151
-                    ),
142
+              ),
143
+              Padding(
144
+                padding: EdgeInsets.fromLTRB(15, 0, 0, 5),
145
+                child: const Text(
146
+                  '您好!',
147
+                  style: TextStyle(
148
+                    fontWeight: FontWeight.bold,
149
+                    fontSize: 33,
152 150
                   ),
153 151
                 ),
154
-                Cell(
155
-                    // margin: EdgeInsets.symmetric(horizontal: 13.w),
156
-                    margin: const EdgeInsets.fromLTRB(13, 43, 10, 0),
157
-                    header: Text(
158
-                      "+86",
159
-                      style: TextStyle(
160
-                        fontSize: 19.sp,
161
-                      ),
162
-                    ),
163
-                    child: TextField(
164
-                      maxLength: 11,
165
-                      keyboardType: TextInputType.number,
166
-                      style: TextStyle(
167
-                        fontSize: 17.sp,
168
-                      ),
169
-                      decoration: const InputDecoration(
170
-                        isCollapsed: true,
171
-                        contentPadding:
172
-                            EdgeInsets.symmetric(vertical: 8, horizontal: 16),
173
-                        labelText: "请输入手机号码",
174
-                        counterText: '', //去掉计数
175
-                        border: InputBorder.none,
176
-                        floatingLabelBehavior: FloatingLabelBehavior.never,
177
-                      ),
178
-                      onChanged: (e) {
179
-                        _handlePhone(e);
180
-                      },
181
-                    ),
182
-                    footer: SizedBox(
183
-                      child: ElevatedButton(
184
-                        onPressed: () => {
185
-                          setState(() {
186
-                            _buttonClickListen();
187
-                          })
188
-                        },
189
-                        child: Text(
190
-                          '$buttonText',
191
-                          style: TextStyle(
192
-                            fontSize: 15.sp,
193
-                          ),
194
-                        ),
195
-                        style: ButtonStyle(
196
-                          backgroundColor: isButtonEnable
197
-                              ? MaterialStateProperty.all(
198
-                                  const Color(0xFFFF703B))
199
-                              : MaterialStateProperty.all(
200
-                                  const Color(0xFFCBCBCB)),
201
-                          shape: MaterialStateProperty.all(
202
-                              const RoundedRectangleBorder(
203
-                                  borderRadius:
204
-                                      BorderRadius.all(Radius.circular(10)))),
205
-                        ),
206
-                      ),
207
-                    )),
208
-                Cell(
152
+              ),
153
+              Padding(
154
+                padding: EdgeInsets.fromLTRB(15, 0, 0, 0),
155
+                child: const Text(
156
+                  '欢迎进入农户端应用!',
157
+                  style: TextStyle(
158
+                    fontWeight: FontWeight.bold,
159
+                    fontSize: 27,
160
+                  ),
161
+                ),
162
+              ),
163
+              Cell(
209 164
                   // margin: EdgeInsets.symmetric(horizontal: 13.w),
210
-                  margin: const EdgeInsets.fromLTRB(13, 16, 10, 0),
211
-
212
-                  header: Align(
213
-                    alignment: FractionalOffset(0.1, 0.5),
214
-                    child: Image.asset(
215
-                      'images/phoneCode.png',
216
-                      width: 20,
217
-                      height: 20,
165
+                  margin: const EdgeInsets.fromLTRB(13, 43, 10, 0),
166
+                  header: Text(
167
+                    "+86",
168
+                    style: TextStyle(
169
+                      fontSize: 19.sp,
218 170
                     ),
219 171
                   ),
220
-
221 172
                   child: TextField(
173
+                    maxLength: 11,
222 174
                     keyboardType: TextInputType.number,
223 175
                     style: TextStyle(
224 176
                       fontSize: 17.sp,
@@ -227,97 +179,152 @@ class _RouteLogin extends State<MyRouteLogin> {
227 179
                       isCollapsed: true,
228 180
                       contentPadding:
229 181
                           EdgeInsets.symmetric(vertical: 8, horizontal: 16),
230
-                      labelText: "请输入验证码",
182
+                      labelText: "请输入手机号码",
183
+                      counterText: '', //去掉计数
231 184
                       border: InputBorder.none,
232 185
                       floatingLabelBehavior: FloatingLabelBehavior.never,
233 186
                     ),
234 187
                     onChanged: (e) {
235
-                      _handleCode(e);
188
+                      _handlePhone(e);
236 189
                     },
237 190
                   ),
238
-                ),
239
-                Container(
240
-                  height: 350.h,
241
-                  alignment: Alignment.bottomCenter,
242
-                  child: SizedBox(
243
-                    width: 315.w,
244
-                    height: 49.h,
191
+                  footer: SizedBox(
245 192
                     child: ElevatedButton(
246
-                      onPressed: () {
247
-                        _handelSubmit();
193
+                      onPressed: () => {
194
+                        setState(() {
195
+                          _buttonClickListen();
196
+                        })
248 197
                       },
249
-                      child: const Text(
250
-                        "登陆",
198
+                      child: Text(
199
+                        '$buttonText',
251 200
                         style: TextStyle(
252
-                            fontSize: 18,
253
-                            color: Colors.white,
254
-                            fontWeight: FontWeight.bold),
201
+                          fontSize: 15.sp,
202
+                        ),
255 203
                       ),
256 204
                       style: ButtonStyle(
257
-                        elevation: MaterialStateProperty.all(0),
258
-                        backgroundColor:
259
-                            MaterialStateProperty.all(const Color(0xFFFF703B)),
205
+                        backgroundColor: isButtonEnable
206
+                            ? MaterialStateProperty.all(const Color(0xFFFF703B))
207
+                            : MaterialStateProperty.all(
208
+                                const Color(0xFFCBCBCB)),
260 209
                         shape: MaterialStateProperty.all(
261 210
                             const RoundedRectangleBorder(
262 211
                                 borderRadius:
263
-                                    BorderRadius.all(Radius.circular(24.4)))),
212
+                                    BorderRadius.all(Radius.circular(10)))),
264 213
                       ),
265 214
                     ),
215
+                  )),
216
+              Cell(
217
+                // margin: EdgeInsets.symmetric(horizontal: 13.w),
218
+                margin: const EdgeInsets.fromLTRB(13, 16, 10, 0),
219
+
220
+                header: Align(
221
+                  alignment: FractionalOffset(0.1, 0.5),
222
+                  child: Image.asset(
223
+                    'images/phoneCode.png',
224
+                    width: 20,
225
+                    height: 20,
266 226
                   ),
267 227
                 ),
268
-                Container(
269
-                    padding: EdgeInsets.fromLTRB(10.0, 10, 0, 10),
270
-                    child: Row(
271
-                      children: <Widget>[
272
-                        Radio<bool>(
273
-                            value: true,
274
-                            activeColor: Color(0xFFFF703B),
275
-                            groupValue: _newValue,
276
-                            onChanged: (value) {
277
-                              setState(() {
278
-                                _newValue = value!;
279
-                              });
280
-                            }),
281
-                        // SizedBox(
282
-                        //   child:Text('文本协议/隐私政策',style: TextStyle(fontSize:15.sp,color: Color(0xffce3800))),
283
-                        // ),
284
-                        Text('请认真查看',
285
-                            style: TextStyle(
286
-                                fontSize: 14.sp, color: Color(0xff2a2a2a))),
287
-                        GestureDetector(
288
-                          onTap: () {
289
-                            Get.toNamed('/agreement');
290
-                          },
291
-                          child: Text('文本协议/隐私政策',
292
-                              style: TextStyle(
293
-                                  fontSize: 14.sp, color: Color(0xffce3800))),
294
-                        ),
295
-                        Text(',确认之后选择此项',
228
+
229
+                child: TextField(
230
+                  keyboardType: TextInputType.number,
231
+                  style: TextStyle(
232
+                    fontSize: 17.sp,
233
+                  ),
234
+                  decoration: const InputDecoration(
235
+                    isCollapsed: true,
236
+                    contentPadding:
237
+                        EdgeInsets.symmetric(vertical: 8, horizontal: 16),
238
+                    labelText: "请输入验证码",
239
+                    border: InputBorder.none,
240
+                    floatingLabelBehavior: FloatingLabelBehavior.never,
241
+                  ),
242
+                  onChanged: (e) {
243
+                    _handleCode(e);
244
+                  },
245
+                ),
246
+              ),
247
+              Container(
248
+                height: 350.h,
249
+                alignment: Alignment.bottomCenter,
250
+                child: SizedBox(
251
+                  width: 315.w,
252
+                  height: 49.h,
253
+                  child: ElevatedButton(
254
+                    onPressed: () {
255
+                      _handelSubmit();
256
+                    },
257
+                    child: const Text(
258
+                      "登录",
259
+                      style: TextStyle(
260
+                          fontSize: 18,
261
+                          color: Colors.white,
262
+                          fontWeight: FontWeight.bold),
263
+                    ),
264
+                    style: ButtonStyle(
265
+                      elevation: MaterialStateProperty.all(0),
266
+                      backgroundColor:
267
+                          MaterialStateProperty.all(const Color(0xFFFF703B)),
268
+                      shape: MaterialStateProperty.all(
269
+                          const RoundedRectangleBorder(
270
+                              borderRadius:
271
+                                  BorderRadius.all(Radius.circular(24.4)))),
272
+                    ),
273
+                  ),
274
+                ),
275
+              ),
276
+              Container(
277
+                  padding: EdgeInsets.fromLTRB(10.0, 10, 0, 10),
278
+                  child: Row(
279
+                    children: <Widget>[
280
+                      Radio<bool>(
281
+                          value: true,
282
+                          activeColor: Color(0xFFFF703B),
283
+                          groupValue: _newValue,
284
+                          onChanged: (value) {
285
+                            setState(() {
286
+                              _newValue = value!;
287
+                            });
288
+                          }),
289
+                      // SizedBox(
290
+                      //   child:Text('文本协议/隐私政策',style: TextStyle(fontSize:15.sp,color: Color(0xffce3800))),
291
+                      // ),
292
+                      Text('请认真查看',
293
+                          style: TextStyle(
294
+                              fontSize: 14.sp, color: Color(0xff2a2a2a))),
295
+                      GestureDetector(
296
+                        onTap: () {
297
+                          Get.toNamed('/agreement');
298
+                        },
299
+                        child: Text('文本协议/隐私政策',
296 300
                             style: TextStyle(
297
-                                fontSize: 14.sp, color: Color(0xff2a2a2a))),
298
-                        // RichText(
299
-                        //   text: TextSpan(children: <InlineSpan>[
300
-                        //     const TextSpan(
301
-                        //         text: '请认真查看',
302
-                        //         style: TextStyle(color: Color(0xff2a2a2a))),
303
-                        //     TextSpan(
304
-                        //       text: '文本协议/隐私政策,',
305
-                        //       style: TextStyle(color: Color(0xffce3800)),
306
-                        //       recognizer:
307
-                        //           TapGestureRecognizer() //踩坑。。。recognizer 是手势交互 除了我现在些的是 点击交互,其他一般都是抽象类。
308
-                        //             ..onTap = () {
309
-                        //               Get.toNamed('/agreement');
310
-                        //             },
311
-                        //     ),
312
-                        //     const TextSpan(
313
-                        //         text: '确认之后选择此项',
314
-                        //         style: TextStyle(color: Color(0xff2a2a2a))),
315
-                        //   ]),
316
-                        // ),
317
-                      ],
318
-                    )),
319
-              ],
320
-            ),
301
+                                fontSize: 14.sp, color: Color(0xffce3800))),
302
+                      ),
303
+                      Text(',确认之后选择此项',
304
+                          style: TextStyle(
305
+                              fontSize: 14.sp, color: Color(0xff2a2a2a))),
306
+                      // RichText(
307
+                      //   text: TextSpan(children: <InlineSpan>[
308
+                      //     const TextSpan(
309
+                      //         text: '请认真查看',
310
+                      //         style: TextStyle(color: Color(0xff2a2a2a))),
311
+                      //     TextSpan(
312
+                      //       text: '文本协议/隐私政策,',
313
+                      //       style: TextStyle(color: Color(0xffce3800)),
314
+                      //       recognizer:
315
+                      //           TapGestureRecognizer() //踩坑。。。recognizer 是手势交互 除了我现在些的是 点击交互,其他一般都是抽象类。
316
+                      //             ..onTap = () {
317
+                      //               Get.toNamed('/agreement');
318
+                      //             },
319
+                      //     ),
320
+                      //     const TextSpan(
321
+                      //         text: '确认之后选择此项',
322
+                      //         style: TextStyle(color: Color(0xff2a2a2a))),
323
+                      //   ]),
324
+                      // ),
325
+                    ],
326
+                  )),
327
+            ],
321 328
           ),
322 329
         ),
323 330
       ),

+ 6
- 2
lib/pages/machinery/detail/index.dart View File

@@ -3,6 +3,7 @@ import 'package:farmer_client/models/entities/CardInfo.dart';
3 3
 import 'package:farmer_client/widgets/layout/BasicPage.dart';
4 4
 import 'package:flutter/material.dart';
5 5
 import 'package:flutter_easyloading/flutter_easyloading.dart';
6
+import 'package:fluttertoast/fluttertoast.dart';
6 7
 import 'package:get/get.dart';
7 8
 import '../../../services/homeAPI.dart';
8 9
 import 'widgets/detail.dart';
@@ -31,13 +32,16 @@ class MachineryDetailPage extends BasicPage {
31 32
       markId = Get.arguments['id'];
32 33
       marKm = Get.arguments['km'];
33 34
       print(marKm);
34
-      getMachineryInfo(markId, appController.locationStr, true)
35
+      getMachineryInfo(
36
+              markId, appController.locationStr ?? '112.091892,32.690712', true)
35 37
           .then((value) {
36 38
         machineryInfoContent(CardInfo.fromJson(value));
37 39
         machineryListBanner(machineryInfoContent().imagesList!);
38 40
         machineryListContent(machineryInfoContent().contentList!);
39 41
         EasyLoading.dismiss();
40
-
42
+      }).catchError((error) {
43
+        EasyLoading.dismiss();
44
+        Fluttertoast.showToast(msg: error.error['message']);
41 45
       });
42 46
     }
43 47
     print("----show----detail page--------------");

+ 6
- 2
lib/pages/machinery/map/index.dart View File

@@ -3,6 +3,7 @@ import 'package:farmer_client/pages/machinery/map/widgets/detail.dart';
3 3
 import 'package:farmer_client/widgets/layout/BasicPage.dart';
4 4
 import 'package:flutter/material.dart';
5 5
 import 'package:flutter_easyloading/flutter_easyloading.dart';
6
+import 'package:fluttertoast/fluttertoast.dart';
6 7
 import 'package:get/get.dart';
7 8
 
8 9
 import '../../../models/entities/CardInfo.dart';
@@ -31,11 +32,14 @@ class MachineryMapPage extends BasicPage {
31 32
       markId = Get.arguments['id'];
32 33
       marKm = Get.arguments['km'];
33 34
       print(marKm);
34
-      getMachineryInfo(markId, appController.locationStr, true)
35
+      getMachineryInfo(
36
+              markId, appController.locationStr ?? '112.091892,32.690712', true)
35 37
           .then((value) {
36 38
         machineryInfoContent(CardInfo.fromJson(value));
37 39
         EasyLoading.dismiss();
38
-
40
+      }).catchError((error) {
41
+        EasyLoading.dismiss();
42
+        Fluttertoast.showToast(msg: error.error['message']);
39 43
       });
40 44
     }
41 45
     print("----show----map page--------------");

+ 9
- 7
lib/pages/main/widgets/main/index.dart View File

@@ -15,13 +15,12 @@ class MainPage extends StatelessWidget {
15 15
 
16 16
   GetStorage box = GetStorage();
17 17
 
18
-
19 18
   void _userOut() {
20 19
     modal.showDialog(
21 20
         title: '提示',
22 21
         content: Container(
23 22
           alignment: Alignment.center,
24
-          child: Text('确定要退出登吗?'),
23
+          child: Text('确定要退出登吗?'),
25 24
         ),
26 25
         onCancel: () => true,
27 26
         onConfirm: () => {
@@ -43,9 +42,10 @@ class MainPage extends StatelessWidget {
43 42
               OtherColumn(), //功能菜单栏
44 43
               Card(
45 44
                 //设置圆角
46
-                shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
45
+                shape: RoundedRectangleBorder(
46
+                    borderRadius: BorderRadius.circular(20.0)),
47 47
                 // 普通的边
48
-                elevation: 1,// 阴影大小
48
+                elevation: 1, // 阴影大小
49 49
                 // height: 70.h,
50 50
                 margin: EdgeInsets.only(top: 10, bottom: 40.0),
51 51
                 child: SizedBox(
@@ -56,7 +56,7 @@ class MainPage extends StatelessWidget {
56 56
                       _userOut();
57 57
                     },
58 58
                     child: const Text(
59
-                      "退出登",
59
+                      "退出登",
60 60
                       style: TextStyle(
61 61
                           fontSize: 18,
62 62
                           color: Colors.black,
@@ -76,8 +76,10 @@ class MainPage extends StatelessWidget {
76 76
               ),
77 77
               Container(
78 78
                 margin: EdgeInsets.fromLTRB(0, 5, 0, 15),
79
-                child: Text('南京市云致科技有限公司 提供技术支持',style: TextStyle(fontSize: 15.sp,color: Color(
80
-                    0xff999999)),),
79
+                child: Text(
80
+                  '南京市云致科技有限公司 提供技术支持',
81
+                  style: TextStyle(fontSize: 15.sp, color: Color(0xff999999)),
82
+                ),
81 83
               )
82 84
             ],
83 85
           ),

+ 1
- 1
lib/pages/main/widgets/main/widgets/UserInfo.dart View File

@@ -108,7 +108,7 @@ class UserInfo extends StatelessWidget {
108 108
                       ),
109 109
                     ),
110 110
                     // const Text(
111
-                    //      '点击登',
111
+                    //      '点击登',
112 112
                     //      style: TextStyle(
113 113
                     //        color: Colors.white,
114 114
                     //        fontSize: 17,

+ 112
- 124
lib/pages/orderInfo/index.dart View File

@@ -22,24 +22,24 @@ class OrderPageInfo extends BasicPage {
22 22
   final id = Rx<String>('');
23 23
   final orderStateText = Rx<String>('待支付');
24 24
   final orderStateColor = Rx<Color>(Colors.black);
25
-  final orderInfoContent = Rx<OrderInfoModel>(OrderInfoModel());
25
+  final orderInfoContent = Rx<OrderInfoModel>(OrderInfoModel.fromJson(
26
+      {'status': 6, 'dispatchStatus': 6, 'workStatus': 6}));
27
+
26 28
   final evalText = Rx<String>('');
27 29
   final evalStars = Rx<num>(-1);
28
-  var processStatus;
29 30
 
30 31
   // orderStates
31 32
   @override
32 33
   void beforeShow() {
33 34
     // TODO: implement beforeShow
34 35
     super.beforeShow();
35
-    if (Get.arguments['id'] != null) {
36
-      id(Get.arguments['id']);
36
+    if (Get.arguments != null && Get.arguments['orderId'] != null) {
37
+      id(Get.arguments['orderId']);
37 38
 
38
-      orderInfo(id()).then((value) {
39
+      orderInfo(Get.arguments['orderId']).then((value) {
39 40
         EasyLoading.show(status: '数据加载中...');
40 41
         OrderInfoModel orderInfo = OrderInfoModel.fromJson(value);
41
-        processStatus = getProcessStatus(orderInfo);
42
-        ProcessSign processSign = getProcessSign(processStatus);
42
+        ProcessSign processSign = getProcessSign(getProcessStatus(orderInfo));
43 43
         orderStateText(processSign.label);
44 44
         orderStateColor(processSign.color);
45 45
         orderInfoContent(orderInfo);
@@ -48,6 +48,57 @@ class OrderPageInfo extends BasicPage {
48 48
     }
49 49
   }
50 50
 
51
+  Widget _action(BuildContext context, String orderId) {
52
+    bool mustAction = false;
53
+    var btnLabel;
54
+    var btnFunction;
55
+
56
+    switch (getProcessStatus(orderInfoContent.value)) {
57
+      case 1:
58
+      case 2:
59
+        mustAction = true;
60
+        btnLabel = '取消';
61
+        btnFunction = () {
62
+          _cancelOrder(orderId);
63
+        };
64
+        break;
65
+      case 4:
66
+        mustAction = true;
67
+        btnLabel = '支付';
68
+        btnFunction = () {
69
+          _bottomSheet(context);
70
+        };
71
+        break;
72
+      case 5:
73
+        mustAction = true;
74
+        btnLabel = '评价';
75
+        btnFunction = () {
76
+          _fnEvaluate(orderId);
77
+        };
78
+        break;
79
+      case 3:
80
+      case 6:
81
+      default:
82
+        break;
83
+    }
84
+
85
+    if (mustAction) {
86
+      return DefaultButton(
87
+        color: const Color(0xffffffff),
88
+        backColor: const Color(0xFFFF703B),
89
+        width: 300.w,
90
+        height: 49.h,
91
+        text: btnLabel,
92
+        margin: const EdgeInsets.all(0),
93
+        fontSize: 20.sp,
94
+        radius: 24.5.w,
95
+        onPressed: btnFunction,
96
+      );
97
+    } else {
98
+      return const Text('');
99
+    }
100
+  }
101
+
51 102
   @override
52 103
   Widget builder(BuildContext context) {
53 104
     naviTitle = '订单详情';
@@ -79,11 +130,11 @@ class OrderPageInfo extends BasicPage {
79 130
         ),
80 131
         onCancel: () => true,
81 132
         onConfirm: () => {
82
-          orderDelete(orderId).then((value) {
83
-            Fluttertoast.showToast(msg: '订单取消成功!');
84
-            Get.offAllNamed('/order');
85
-          })
86
-        });
133
+              orderDelete(orderId).then((value) {
134
+                Fluttertoast.showToast(msg: '订单取消成功!');
135
+                Get.offAllNamed('/order');
136
+              })
137
+            });
87 138
   }
88 139
 
89 140
   // 满意度表单
@@ -94,38 +145,30 @@ class OrderPageInfo extends BasicPage {
94 145
     return Container(
95 146
         alignment: Alignment.center,
96 147
         child: Container(
97
-          margin:
98
-          const EdgeInsets.fromLTRB(15, 20, 15, 20),
148
+          margin: const EdgeInsets.fromLTRB(15, 20, 15, 20),
99 149
           child: Column(
100 150
             children: [
101 151
               Container(
102
-                padding: const EdgeInsets.fromLTRB(
103
-                    0, 0, 0, 10),
152
+                padding: const EdgeInsets.fromLTRB(0, 0, 0, 10),
104 153
                 decoration: const BoxDecoration(
105 154
                     border: Border(
106
-                        bottom: BorderSide(
107
-                            width: 0.8,
108
-                            color: Color(0x20000000)
109
-                          // 0x17000000
110
-                        ))),
155
+                        bottom: BorderSide(width: 0.8, color: Color(0x20000000)
156
+                            // 0x17000000
157
+                            ))),
111 158
                 child: Row(
112 159
                   children: [
113 160
                     Text(
114 161
                       '满意度:',
115 162
                       style: TextStyle(
116
-                          fontSize: 17.sp,
117
-                          fontWeight: FontWeight.bold),
163
+                          fontSize: 17.sp, fontWeight: FontWeight.bold),
118 164
                     ),
119 165
                     FFStars(
120 166
                       //https://pub.dev/packages/ff_stars
121
-                      normalStar: Image.asset(
122
-                          'images/icons/starOff.png'),
123
-                      selectedStar: Image.asset(
124
-                          'images/icons/starOn.png'),
125
-                      starsChanged:
126
-                          (realStars, selectedStars) {
127
-                            star = realStars;
128
-                            onEvaluate(star, desc);
167
+                      normalStar: Image.asset('images/icons/starOff.png'),
168
+                      selectedStar: Image.asset('images/icons/starOn.png'),
169
+                      starsChanged: (realStars, selectedStars) {
170
+                        star = realStars;
171
+                        onEvaluate(star, desc);
129 172
                       },
130 173
                       step: 1,
131 174
                       defaultStars: 0,
@@ -134,8 +177,7 @@ class OrderPageInfo extends BasicPage {
134 177
                 ),
135 178
               ),
136 179
               Container(
137
-                margin: const EdgeInsets.fromLTRB(
138
-                    0, 20, 0, 0),
180
+                margin: const EdgeInsets.fromLTRB(0, 20, 0, 0),
139 181
                 width: 300.w,
140 182
                 height: 100.w,
141 183
                 decoration: BoxDecoration(
@@ -147,15 +189,13 @@ class OrderPageInfo extends BasicPage {
147 189
                 child: TextField(
148 190
                   minLines: 6,
149 191
                   maxLines: 6,
150
-                  style: TextStyle(
151
-                      fontSize: 17.sp, height: 1.5),
192
+                  style: TextStyle(fontSize: 17.sp, height: 1.5),
152 193
                   decoration: const InputDecoration(
153 194
                     isCollapsed: true,
154 195
                     border: InputBorder.none,
155 196
                     counterText: '',
156 197
                     hintText: '请输入评价内容',
157
-                    floatingLabelBehavior:
158
-                    FloatingLabelBehavior.never,
198
+                    floatingLabelBehavior: FloatingLabelBehavior.never,
159 199
                   ),
160 200
                   onChanged: (e) {
161 201
                     desc = e;
@@ -184,9 +224,7 @@ class OrderPageInfo extends BasicPage {
184 224
       onCancel: () => true,
185 225
       onConfirm: () {
186 226
         if (evalStars != -1 && evalText != '') {
187
-          orderEvaluation(
188
-              orderId, evalStars, evalText)
189
-              .then((value) {
227
+          orderEvaluation(orderId, evalStars, evalText).then((value) {
190 228
             Fluttertoast.showToast(msg: '评价成功!');
191 229
             Get.offAllNamed('/order');
192 230
           });
@@ -199,15 +237,16 @@ class OrderPageInfo extends BasicPage {
199 237
   }
200 238
 
201 239
   // 调用支付接口
202
-  Future<void> payMoney (String payType) async {
203
-    if(payType=='wxPay'){
204
-      final isInstall=await fluwx.isWeChatInstalled;
205
-      if(!isInstall){
240
+  Future<void> payMoney(String payType) async {
241
+    if (payType == 'wxPay') {
242
+      final isInstall = await fluwx.isWeChatInstalled;
243
+      if (!isInstall) {
206 244
         EasyLoading.showError('请先安装微信');
207 245
         return;
208 246
       }
209 247
       createOrder(id.value, "wx").then((value) {
210
-        fluwx.payWithWeChat(
248
+        fluwx
249
+            .payWithWeChat(
211 250
           appId: value['appid'].toString(),
212 251
           partnerId: value['partnerId'].toString(),
213 252
           prepayId: value['prepayId'].toString(),
@@ -215,9 +254,10 @@ class OrderPageInfo extends BasicPage {
215 254
           nonceStr: value['noncestr'].toString(),
216 255
           timeStamp: int.parse(value['timestamp'].toString()),
217 256
           sign: value['sign'].toString(),
218
-        ).then((res) {
257
+        )
258
+            .then((res) {
219 259
           print("payWithWeChat--------${res}");
220
-        }).catchError((onError){
260
+        }).catchError((onError) {
221 261
           print("payWithWeChat错误--------${onError}");
222 262
         });
223 263
       });
@@ -230,16 +270,15 @@ class OrderPageInfo extends BasicPage {
230 270
           // EasyLoading.showSuccess('支付成功');
231 271
           Get.snackbar('提示', "支付成功");
232 272
           Get.offAllNamed('/order');
233
-        }else{
234
-
273
+        } else {
235 274
           EasyLoading.showError('支付失败');
236 275
         }
237 276
         // 关闭弹窗
238 277
       });
239 278
       return;
240
-    } else if(payType=='aliPay'){
241
-      final isInstall=await tobias.isAliPayInstalled();
242
-      if(!isInstall){
279
+    } else if (payType == 'aliPay') {
280
+      final isInstall = await tobias.isAliPayInstalled();
281
+      if (!isInstall) {
243 282
         EasyLoading.showError('请先安装支付宝');
244 283
         return;
245 284
       }
@@ -273,79 +312,28 @@ class OrderPageInfo extends BasicPage {
273 312
             height: 200.w, //对话框高度就是此高度
274 313
             child: Center(
275 314
                 child: Column(
276
-                  children: [
277
-                    Padding(
278
-                      padding: EdgeInsets.fromLTRB(0, 25.w, 0, 34.w),
279
-                      child: Bold(text: "支付方式", fontSize: 17.sp),
280
-                    ),
281
-                    PayItem(
282
-                      label: "支付宝",
283
-                      icon: const AssetImage('images/alipay.png'),
284
-                      onPress: () {
285
-                        payMoney('aliPay');
286
-                      },
287
-                    ),
288
-                    PayItem(
289
-                      label: "微信",
290
-                      icon: const AssetImage('images/weChatPay.png'),
291
-                      onPress: () {
292
-                        payMoney('wxPay');
293
-                      },
294
-                    ),
295
-                  ],
296
-                )),
315
+              children: [
316
+                Padding(
317
+                  padding: EdgeInsets.fromLTRB(0, 25.w, 0, 34.w),
318
+                  child: Bold(text: "支付方式", fontSize: 17.sp),
319
+                ),
320
+                PayItem(
321
+                  label: "支付宝",
322
+                  icon: const AssetImage('images/alipay.png'),
323
+                  onPress: () {
324
+                    payMoney('aliPay');
325
+                  },
326
+                ),
327
+                PayItem(
328
+                  label: "微信",
329
+                  icon: const AssetImage('images/weChatPay.png'),
330
+                  onPress: () {
331
+                    payMoney('wxPay');
332
+                  },
333
+                ),
334
+              ],
335
+            )),
297 336
           );
298 337
         });
299 338
   }
300
-
301
-  Widget _action(BuildContext context, String orderId) {
302
-    bool mustAction = false;
303
-    var btnLabel;
304
-    var btnFunction;
305
-
306
-    switch (processStatus) {
307
-      case 1:
308
-      case 2:
309
-        mustAction = true;
310
-        btnLabel = '取消';
311
-        btnFunction = () {
312
-          _cancelOrder(orderId);
313
-        };
314
-        break;
315
-      case 4:
316
-        mustAction = true;
317
-        btnLabel = '支付';
318
-        btnFunction = () {
319
-          _bottomSheet(context);
320
-        };
321
-        break;
322
-      case 5:
323
-        mustAction = true;
324
-        btnLabel = '评价';
325
-        btnFunction = () {
326
-          _fnEvaluate(orderId);
327
-        };
328
-        break;
329
-      case 3:
330
-      case 6:
331
-      default:
332
-        break;
333
-    }
334
-
335
-    if (mustAction) {
336
-      return DefaultButton(
337
-        color: const Color(0xffffffff),
338
-        backColor: const Color(0xFFFF703B),
339
-        width: 300.w,
340
-        height: 49.h,
341
-        text: btnLabel,
342
-        margin: const EdgeInsets.all(0),
343
-        fontSize: 20.sp,
344
-        radius: 24.5.w,
345
-        onPressed: btnFunction,
346
-      );
347
-    } else {
348
-      return const Text('');
349
-    }
350
-  }
351 339
 }

+ 11
- 17
lib/services/homeAPI.dart View File

@@ -34,15 +34,14 @@ Future getMachinery(params) async {
34 34
  * @param {*} data
35 35
  * @returns
36 36
  */
37
-Future searchMachinery(
38
-    params
39
-) async {
37
+Future searchMachinery(params) async {
40 38
   return request('/machinery',
41
-      options: Options(method: 'GET'),
42
-      queryParameters: params,
43
-      data: params).catchError((error) => {
44
-        Fluttertoast.showToast(msg: error.error['message']),
45
-      });
39
+          options: Options(method: 'GET'),
40
+          queryParameters: params,
41
+          data: params)
42
+      .catchError((error) => {
43
+            Fluttertoast.showToast(msg: error.error['message']),
44
+          });
46 45
 }
47 46
 
48 47
 /**
@@ -76,11 +75,8 @@ Future typeMachinery(
76 75
 
77 76
 Future getMachineryInfo(String id, String location, bool attached) async {
78 77
   return request('/machinery-summary/$id',
79
-          options: Options(method: 'GET'),
80
-          queryParameters: {'location': location, 'attached': attached})
81
-      .catchError((error) => {
82
-            Fluttertoast.showToast(msg: error.error['message']),
83
-          });
78
+      options: Options(method: 'GET'),
79
+      queryParameters: {'location': location, 'attached': attached});
84 80
 }
85 81
 
86 82
 /**
@@ -89,8 +85,6 @@ Future getMachineryInfo(String id, String location, bool attached) async {
89 85
  * @returns
90 86
  */
91 87
 Future getMachineryType(params) async {
92
-  return request('/machinery-type', options: Options(method: 'GET'),queryParameters: params);
88
+  return request('/machinery-type',
89
+      options: Options(method: 'GET'), queryParameters: params);
93 90
 }
94
-
95
-
96
-

+ 1
- 1
lib/services/user.dart View File

@@ -12,7 +12,7 @@ Future getSMSCaptch(String phone) async {
12 12
   });
13 13
 }
14 14
 
15
-//登
15
+//登
16 16
 Future userLogin(String userName, String password) async {
17 17
   return request(
18 18
     '/login',

+ 9
- 0
lib/utils/location.dart View File

@@ -33,6 +33,12 @@ void showPrivacy() {
33 33
 
34 34
 // 判断定位权限
35 35
 Future _requirePermission() async {
36
+  print(1);
37
+  // print(Permission.location);
38
+  print(2);
39
+  // print(Permission.locationAlways);
40
+  print(3);
41
+
36 42
   PermissionStatus _permissionGranted = await Permission.location.status;
37 43
   if (_permissionGranted == PermissionStatus.denied) {
38 44
     // 如果未允许, 尝试申请一次
@@ -40,6 +46,9 @@ Future _requirePermission() async {
40 46
     if (_permissionGranted != PermissionStatus.granted) {
41 47
       throw Exception("请设置允许当前程序定位功能");
42 48
     }
49
+    // if (await PermissionHelper.check(Permission.locationAlways)) {
50
+    //   // 这里写应用获取权限之后的业务逻辑
51
+    // }
43 52
   }
44 53
 }
45 54
 

+ 39
- 32
lib/widgets/OrderListCard.dart View File

@@ -12,7 +12,7 @@ class TextCell extends StatelessWidget {
12 12
   String title;
13 13
   String? value;
14 14
 
15
-  TextCell({Key? key, required this.title, this.value}):super(key: key);
15
+  TextCell({Key? key, required this.title, this.value}) : super(key: key);
16 16
 
17 17
   @override
18 18
   Widget build(BuildContext context) {
@@ -33,7 +33,6 @@ class TextCell extends StatelessWidget {
33 33
       ]),
34 34
     );
35 35
   }
36
-
37 36
 }
38 37
 
39 38
 class OrderListCard extends StatelessWidget {
@@ -56,7 +55,7 @@ class OrderListCard extends StatelessWidget {
56 55
             offset: Offset(0.0, 15.0), //阴影xy轴偏移量
57 56
             blurRadius: 15.0, //阴影模糊程度
58 57
             spreadRadius: 1.0 //阴影扩散程度
59
-        )
58
+            )
60 59
       ]),
61 60
       child: Row(
62 61
         crossAxisAlignment: CrossAxisAlignment.start,
@@ -81,21 +80,23 @@ class OrderListCard extends StatelessWidget {
81 80
                   decoration: const BoxDecoration(
82 81
                       border: Border(
83 82
                           bottom:
84
-                          BorderSide(width: 0.5, color: Color(0x20000000)
85
-                            // 0x17000000
86
-                          ))),
83
+                              BorderSide(width: 0.5, color: Color(0x20000000)
84
+                                  // 0x17000000
85
+                                  ))),
87 86
                   child: GestureDetector(
88
-                    child:
89
-                    Row(
87
+                    child: Row(
90 88
                       mainAxisAlignment: MainAxisAlignment.spaceBetween,
91 89
                       children: [
92 90
                         TextCell(title: '订单编号:', value: item.orderNo),
93
-                        Bold(text: "详情 >>", fontSize: 16.sp, color: const Color(0xff222222)),
91
+                        Bold(
92
+                            text: "详情 >>",
93
+                            fontSize: 16.sp,
94
+                            color: const Color(0xff222222)),
94 95
                       ],
95 96
                     ),
96 97
                     onTap: () {
97 98
                       Get.toNamed('/orderPageInfo', arguments: {
98
-                        'id': item.orderId,
99
+                        'orderId': item.orderId,
99 100
                         'title': processSign.label,
100 101
                         'styleColor': processSign.color
101 102
                       });
@@ -104,28 +105,34 @@ class OrderListCard extends StatelessWidget {
104 105
                 ),
105 106
                 Expanded(
106 107
                     child: Column(
107
-                      crossAxisAlignment: CrossAxisAlignment.start,
108
-                      children: [
109
-                        Padding(
110
-                          padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
111
-                          child: TextCell(title: '农机名称:', value: item.machineryName),
112
-                        ),
113
-                        Padding(
114
-                          padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
115
-                          child: TextCell(title: '作业面积:', value: item.amount.toString()),
116
-                        ),
117
-                        Padding(
118
-                          padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
119
-                          child: TextCell(title: '需求时间:', value: DateFormat("yyyy-MM-dd").format(
108
+                  crossAxisAlignment: CrossAxisAlignment.start,
109
+                  children: [
110
+                    Padding(
111
+                      padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
112
+                      child:
113
+                          TextCell(title: '农机名称:', value: item.machineryName),
114
+                    ),
115
+                    Padding(
116
+                      padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
117
+                      child: TextCell(
118
+                          title: '作业面积:', value: item.amount.toString()),
119
+                    ),
120
+                    Padding(
121
+                      padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
122
+                      child: TextCell(
123
+                          title: '需求时间:',
124
+                          value: DateFormat("yyyy-MM-dd").format(
120 125
                               DateTime.parse(item.appointmentDate.toString()))),
121
-                        ),
122
-                        Padding(
123
-                          padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
124
-                          child: TextCell(title: '需求时间:', value: DateFormat("yyyy-MM-dd").format(
126
+                    ),
127
+                    Padding(
128
+                      padding: const EdgeInsets.fromLTRB(0, 0, 0, 15),
129
+                      child: TextCell(
130
+                          title: '需求时间:',
131
+                          value: DateFormat("yyyy-MM-dd").format(
125 132
                               DateTime.parse(item.createDate.toString()))),
126
-                        ),
127
-                      ],
128
-                    )),
133
+                    ),
134
+                  ],
135
+                )),
129 136
                 Container(
130 137
                   margin: const EdgeInsets.fromLTRB(0, 0, 0, 30),
131 138
                   padding: const EdgeInsets.fromLTRB(0, 20, 0, 0),
@@ -168,8 +175,8 @@ class OrderListCard extends StatelessWidget {
168 175
                             child: RichText(
169 176
                               text: TextSpan(children: <InlineSpan>[
170 177
                                 TextSpan(
171
-                                    text: ((item.charges ?? 0) / 100)
172
-                                        .toString(),
178
+                                    text:
179
+                                        ((item.charges ?? 0) / 100).toString(),
173 180
                                     style: const TextStyle(
174 181
                                       fontSize: 16,
175 182
                                       fontWeight: FontWeight.bold,

+ 9
- 9
pubspec.lock View File

@@ -112,7 +112,7 @@ packages:
112 112
       name: collection
113 113
       url: "https://pub.flutter-io.cn"
114 114
     source: hosted
115
-    version: "1.15.0"
115
+    version: "1.16.0"
116 116
   convert:
117 117
     dependency: transitive
118 118
     description:
@@ -154,7 +154,7 @@ packages:
154 154
       name: fake_async
155 155
       url: "https://pub.flutter-io.cn"
156 156
     source: hosted
157
-    version: "1.2.0"
157
+    version: "1.3.0"
158 158
   ff_stars:
159 159
     dependency: "direct main"
160 160
     description:
@@ -293,7 +293,7 @@ packages:
293 293
       name: js
294 294
       url: "https://pub.flutter-io.cn"
295 295
     source: hosted
296
-    version: "0.6.3"
296
+    version: "0.6.4"
297 297
   json_annotation:
298 298
     dependency: transitive
299 299
     description:
@@ -335,7 +335,7 @@ packages:
335 335
       name: material_color_utilities
336 336
       url: "https://pub.flutter-io.cn"
337 337
     source: hosted
338
-    version: "0.1.3"
338
+    version: "0.1.4"
339 339
   meta:
340 340
     dependency: transitive
341 341
     description:
@@ -356,7 +356,7 @@ packages:
356 356
       name: path
357 357
       url: "https://pub.flutter-io.cn"
358 358
     source: hosted
359
-    version: "1.8.0"
359
+    version: "1.8.1"
360 360
   path_provider:
361 361
     dependency: transitive
362 362
     description:
@@ -501,7 +501,7 @@ packages:
501 501
       name: source_span
502 502
       url: "https://pub.flutter-io.cn"
503 503
     source: hosted
504
-    version: "1.8.1"
504
+    version: "1.8.2"
505 505
   stack_trace:
506 506
     dependency: transitive
507 507
     description:
@@ -543,7 +543,7 @@ packages:
543 543
       name: test_api
544 544
       url: "https://pub.flutter-io.cn"
545 545
     source: hosted
546
-    version: "0.4.8"
546
+    version: "0.4.9"
547 547
   tobias:
548 548
     dependency: "direct main"
549 549
     description:
@@ -564,7 +564,7 @@ packages:
564 564
       name: vector_math
565 565
       url: "https://pub.flutter-io.cn"
566 566
     source: hosted
567
-    version: "2.1.1"
567
+    version: "2.1.2"
568 568
   watcher:
569 569
     dependency: transitive
570 570
     description:
@@ -594,5 +594,5 @@ packages:
594 594
     source: hosted
595 595
     version: "3.1.1"
596 596
 sdks:
597
-  dart: ">=2.16.1 <3.0.0"
597
+  dart: ">=2.17.0-0 <3.0.0"
598 598
   flutter: ">=2.8.1"