Selaa lähdekoodia

Merge branch 'master' of http://git.ycjcjy.com/nanyang/farmer_client

张延森 3 vuotta sitten
vanhempi
commit
1713827a0d

BIN
images/mineBack.png Näytä tiedosto


BIN
images/userMoren.png Näytä tiedosto


+ 89
- 0
lib/components/UI/DefaultButton.dart Näytä tiedosto

@@ -0,0 +1,89 @@
1
+import 'package:flutter/material.dart';
2
+
3
+
4
+
5
+class DefaultButton extends StatefulWidget {
6
+  //点击回调
7
+  final GestureTapCallback onPressed;
8
+  final String text;
9
+  final EdgeInsetsGeometry margin;
10
+  final double width;
11
+  final double height;
12
+  final double? fontSize;
13
+  final Color backColor;
14
+  final Color color;
15
+
16
+  EdgeInsetsGeometry marginDefault =
17
+  const EdgeInsets.fromLTRB(0, 90.0, 0, 30); //按钮默认的margin值
18
+
19
+  DefaultButton({
20
+    Key? key,
21
+    required this.onPressed,
22
+    required this.text,
23
+    required this.margin,
24
+    required this.width,
25
+    required this.height,
26
+    this.fontSize,
27
+    required this.backColor,
28
+    required this.color,
29
+  }) : super(key: key);
30
+
31
+  @override
32
+  State createState() {
33
+    if (margin == null) {
34
+      return _DefaultButtonState(onPressed, text, marginDefault,width,height,fontSize,backColor,color);
35
+    }
36
+    return _DefaultButtonState(onPressed, text, margin,width,height,fontSize,backColor,color);
37
+  }
38
+}
39
+
40
+class _DefaultButtonState extends State<DefaultButton> {
41
+  //点击回调
42
+  final GestureTapCallback onPressed;
43
+  final String text;
44
+  final EdgeInsetsGeometry margin;
45
+  final double width;
46
+  final double height;
47
+  final double? fontSize;
48
+  final Color backColor;
49
+  final Color color;
50
+  _DefaultButtonState(
51
+      this.onPressed,
52
+      this.text,
53
+      this.margin,
54
+      this.width,
55
+      this.height,
56
+      this.fontSize,
57
+      this.backColor,
58
+      this.color
59
+      );
60
+
61
+  @override
62
+  Widget build(BuildContext context) {
63
+    Widget _SectionBtn = Container(
64
+      margin: margin,
65
+      child: SizedBox(
66
+        width: width,
67
+        height: height,
68
+        child: RaisedButton(
69
+          color: backColor,
70
+          disabledColor: const Color(0xF5F6F7ff),
71
+          disabledTextColor: const Color(0xF5F6F7ff),
72
+          colorBrightness: Brightness.dark,
73
+          shape:
74
+          RoundedRectangleBorder(borderRadius: BorderRadius.circular(5.0)),
75
+          child: Text(text,style:  TextStyle(
76
+              fontSize: fontSize,
77
+              color: color,
78
+          ),),
79
+          textColor: Colors.white,
80
+          onPressed: onPressed,
81
+        ),
82
+      ),
83
+    );
84
+
85
+    return _SectionBtn;
86
+  }
87
+
88
+}
89
+

+ 7
- 18
lib/main.dart Näytä tiedosto

@@ -1,4 +1,5 @@
1 1
 
2
+import 'package:farmer_client/widgets/CarsCard.dart';
2 3
 import 'package:flutter/material.dart';
3 4
 import 'package:get/get.dart';
4 5
 import 'package:get_storage/get_storage.dart';
@@ -59,7 +60,7 @@ class MyApp extends StatelessWidget {
59 60
 }
60 61
 
61 62
 class MyHomePage extends StatefulWidget {
62
-  const MyHomePage({Key? key, required this.title}) : super(key: key);
63
+  const MyHomePage({Key? key,}) : super(key: key);
63 64
 
64 65
   // This widget is the home page of your application. It is stateful, meaning
65 66
   // that it has a State object (defined below) that contains fields that affect
@@ -70,7 +71,7 @@ class MyHomePage extends StatefulWidget {
70 71
   // used by the build method of the State. Fields in a Widget subclass are
71 72
   // always marked "final".
72 73
 
73
-  final String title;
74
+  // final String title;
74 75
 
75 76
   @override
76 77
   State<MyHomePage> createState() => _MyHomePageState();
@@ -82,14 +83,6 @@ class _MyHomePageState extends State<MyHomePage> {
82 83
 
83 84
   @override
84 85
   Widget build(BuildContext context) {
85
-
86
-    ScreenUtil.init(context,
87
-        deviceSize: Size(
88
-            MediaQuery.of(context).size.width,
89
-            MediaQuery.of(context).size.height),
90
-        designSize: const Size(375, 812),
91
-        minTextAdapt: true,
92
-        orientation: Orientation.portrait);
93 86
     // var find = Get.find(tag: 'user');
94 87
 
95 88
     // This method is rerun every time setState is called, for instance as done
@@ -103,7 +96,7 @@ class _MyHomePageState extends State<MyHomePage> {
103 96
         backgroundColor: Colors.amber,
104 97
         // Here we take the value from the MyHomePage object that was created by
105 98
         // the App.build method, and use it to set our appbar title.
106
-        title: Text(widget.title),
99
+        title: Text('widget.title'),
107 100
       ),
108 101
       body: Center(
109 102
         // Center is a layout widget. It takes a single child and positions it
@@ -124,7 +117,7 @@ class _MyHomePageState extends State<MyHomePage> {
124 117
           // axis because Columns are vertical (the cross axis would be
125 118
           // horizontal).
126 119
           mainAxisAlignment: MainAxisAlignment.center,
127
-          children: const <Widget>[
120
+          children:  <Widget>[
128 121
 
129 122
             // Text(
130 123
             //   '$_counter',
@@ -147,13 +140,9 @@ class _MyHomePageState extends State<MyHomePage> {
147 140
             //     );
148 141
             //   },
149 142
             // ),
150
-            // CarsCard(item: CarItem(
151
-            //     name:'元神第二个收割机',
152
-            //   distance:8.8,
153
-            //   price:270.6,
154
-            // )),
143
+            CarsCard(),
155 144
             // Search()
156
-            OrderListCard()
145
+            // OrderListCard()
157 146
           ],
158 147
         ),
159 148
       ),

+ 1
- 0
lib/models/Store.dart Näytä tiedosto

@@ -0,0 +1 @@
1
+// TODO Implement this library.

+ 15
- 0
lib/models/User.dart Näytä tiedosto

@@ -0,0 +1,15 @@
1
+
2
+import 'package:farmer_client/models/entities/person.dart';
3
+import 'package:get/get.dart';
4
+
5
+class User extends GetxController {
6
+  Person? _person;
7
+  Person? get person => _person;
8
+  set person (Person? p) {
9
+    _person = p;
10
+    update();
11
+  }
12
+
13
+  bool get isLogin => _person != null;
14
+
15
+}

+ 1
- 1
lib/models/app.dart Näytä tiedosto

@@ -11,7 +11,7 @@ class AppController extends GetxController {
11 11
   // 有了这句, 可以直接 AppController.t 调用
12 12
   static AppController t = Get.find();
13 13
 
14
-  final user = Person().obs;
14
+  final user = Rx<Person>(Person());
15 15
   final location = Rxn<LocationData>();
16 16
   final testInt = 1.obs;
17 17
 

+ 1
- 1
lib/models/entities/person.dart Näytä tiedosto

@@ -9,7 +9,7 @@ class Person {
9 9
   String? phone;
10 10
   String? userId;
11 11
   int? status;
12
-  DateTime? createDate;
12
+  String? createDate;
13 13
 
14 14
   Person ();
15 15
 

+ 11
- 0
lib/pages/TabBar/Information_page.dart Näytä tiedosto

@@ -0,0 +1,11 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class InformationPage extends StatelessWidget {
4
+  @override
5
+  Widget build(BuildContext context) {
6
+    // TODO: implement build
7
+    return Scaffold(
8
+      body: Center(child: Text('资讯')),
9
+    );
10
+  }
11
+}

+ 11
- 0
lib/pages/TabBar/Mine_page.dart Näytä tiedosto

@@ -0,0 +1,11 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class MinePage extends StatelessWidget {
4
+  @override
5
+  Widget build(BuildContext context) {
6
+    // TODO: implement build
7
+    return Scaffold(
8
+      body: Center(child: Text('我的')),
9
+    );
10
+  }
11
+}

+ 11
- 0
lib/pages/TabBar/Orders_page.dart Näytä tiedosto

@@ -0,0 +1,11 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class OrdersPage extends StatelessWidget {
4
+  @override
5
+  Widget build(BuildContext context) {
6
+    // TODO: implement build
7
+    return Scaffold(
8
+      body: Center(child: Text('订单')),
9
+    );
10
+  }
11
+}

+ 10
- 0
lib/pages/TabBar/home_page.dart Näytä tiedosto

@@ -0,0 +1,10 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class HomePage extends StatelessWidget {
4
+  @override
5
+  Widget build(BuildContext context) {
6
+    return Scaffold(
7
+      body: Center(child: Text('首页')),
8
+    );
9
+  }
10
+}

+ 71
- 0
lib/pages/TabBar/index_page.dart Näytä tiedosto

@@ -0,0 +1,71 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter/cupertino.dart';
3
+import 'home_page.dart';
4
+import 'Information_page.dart';
5
+import 'Mine_page.dart';
6
+import 'Orders_page.dart';
7
+
8
+class IndexPage extends StatefulWidget {
9
+  _IndexPageState createState() => _IndexPageState();
10
+}
11
+
12
+class _IndexPageState extends State<IndexPage> {
13
+
14
+
15
+  final List<BottomNavigationBarItem> bottomTabs = [
16
+     BottomNavigationBarItem(
17
+      icon: Icon(CupertinoIcons.home),
18
+      title: Text('首页'),
19
+    ),
20
+     BottomNavigationBarItem(
21
+      icon: Icon(CupertinoIcons.search),
22
+      title: Text('资讯'),
23
+
24
+    ),
25
+     BottomNavigationBarItem(
26
+      icon: Icon(CupertinoIcons.shopping_cart),
27
+      title: Text('订单'),
28
+
29
+    ),
30
+     BottomNavigationBarItem(
31
+      icon: Icon(CupertinoIcons.profile_circled),
32
+      title: Text('我的'),
33
+    ),
34
+  ];
35
+
36
+  final List tabBodies = [
37
+    HomePage(),
38
+    InformationPage(),
39
+    OrdersPage(),
40
+    MinePage(),
41
+  ];
42
+
43
+  int currentIndex = 0;
44
+  var currentPage;
45
+
46
+  @override
47
+  void initState() {
48
+    super.initState();
49
+    currentPage = tabBodies[currentIndex];
50
+  }
51
+
52
+  @override
53
+  Widget build(BuildContext context) {
54
+    // TODO: implement build
55
+    return Scaffold(
56
+      backgroundColor: Color.fromRGBO(244, 245, 245, 1),
57
+      bottomNavigationBar: BottomNavigationBar(
58
+        type: BottomNavigationBarType.fixed,
59
+        currentIndex: currentIndex,
60
+        items: bottomTabs,
61
+        onTap: (index){
62
+          setState(() {
63
+            currentIndex = index;
64
+            currentPage = tabBodies[currentIndex];
65
+          });
66
+        },
67
+      ),
68
+      body: currentPage,
69
+    );
70
+  }
71
+}

+ 1
- 0
lib/pages/TabBar/member_page.dart Näytä tiedosto

@@ -0,0 +1 @@
1
+// TODO Implement this library.

+ 1
- 0
lib/pages/home.dart Näytä tiedosto

@@ -0,0 +1 @@
1
+// TODO Implement this library.

+ 62
- 91
lib/pages/login/login.dart Näytä tiedosto

@@ -7,29 +7,10 @@ import 'package:flutter/material.dart';
7 7
 import 'package:flutter_screenutil/flutter_screenutil.dart';
8 8
 import 'package:get/get.dart';
9 9
 
10
+import '../../models/entities/person.dart';
10 11
 import '../../services/user.dart';
11 12
 import '../../widgets/Cell.dart';
12 13
 
13
-// class Login extends GetView<User> {
14
-//
15
-//   int _countdown = 60;
16
-//
17
-//   @override
18
-//   Widget build(BuildContext context) {
19
-//     // controller.person
20
-//     return StatefulBuilder(builder: (context, setState) {
21
-//
22
-//       setState(() {
23
-//         _countdown -= 1;
24
-//       });
25
-//
26
-//       return Text("data");
27
-//     });
28
-//   }
29
-//
30
-//
31
-//
32
-// }
33 14
 
34 15
 class MyRouteLogin extends StatefulWidget {
35 16
   @override
@@ -37,6 +18,35 @@ class MyRouteLogin extends StatefulWidget {
37 18
 }
38 19
 
39 20
 class _RouteLogin extends State<MyRouteLogin> {
21
+
22
+var  userInfo= AppController.t.user;
23
+
24
+bool isButtonEnable = true; //按钮状态  是否可点击
25
+String buttonText = '发送验证码'; //初始文本
26
+int count = 60; //初始倒计时时间
27
+var timer; //倒计时的计时器
28
+TextEditingController mController = TextEditingController();
29
+
30
+//获取验证码
31
+void _initTimer() {
32
+  timer = Timer.periodic(Duration(seconds: 1), (Timer timer) {
33
+    count--;
34
+    setState(() {
35
+      if (count == 0) {
36
+        timer.cancel(); //倒计时结束取消定时器
37
+        isButtonEnable = true; //按钮可点击
38
+        count = 60; //重置时间
39
+        buttonText = '发送验证码'; //重置按钮文本
40
+      } else {
41
+        buttonText = '重新发送($count)'; //更新文本内容
42
+      }
43
+    });
44
+  });
45
+}
46
+
47
+
48
+
49
+
40 50
   @override
41 51
   void initState() {
42 52
     super.initState();
@@ -47,28 +57,6 @@ class _RouteLogin extends State<MyRouteLogin> {
47 57
     print(location);
48 58
   }
49 59
 
50
-  bool isButtonEnable = true; //按钮状态  是否可点击
51
-  String buttonText = '发送验证码'; //初始文本
52
-  int count = 60; //初始倒计时时间
53
-  var timer; //倒计时的计时器
54
-  TextEditingController mController = TextEditingController();
55
-
56
-  void _initTimer() {
57
-    timer = Timer.periodic(Duration(seconds: 1), (Timer timer) {
58
-      count--;
59
-      setState(() {
60
-        if (count == 0) {
61
-          timer.cancel(); //倒计时结束取消定时器
62
-          isButtonEnable = true; //按钮可点击
63
-          count = 60; //重置时间
64
-          buttonText = '发送验证码'; //重置按钮文本
65
-        } else {
66
-          buttonText = '重新发送($count)'; //更新文本内容
67
-        }
68
-      });
69
-    });
70
-  }
71
-
72 60
   @override
73 61
   void dispose() {
74 62
     timer?.cancel(); //销毁计时器
@@ -82,6 +70,9 @@ class _RouteLogin extends State<MyRouteLogin> {
82 70
 // -------------逻辑分割-------------------------------------------
83 71
   var handlePhones = '';
84 72
   var handleCodes = '';
73
+  var userContent = {'phones': '', 'code': ''};
74
+  bool _newValue = false;
75
+
85 76
 
86 77
   void _handlePhone(e) => {
87 78
         setState(() => {handlePhones = e})
@@ -91,19 +82,9 @@ class _RouteLogin extends State<MyRouteLogin> {
91 82
         setState(() => {handleCodes = e})
92 83
       };
93 84
 
94
-  var userContent = {'phones': '', 'code': ''};
95 85
 
96
-  void phoneUser() => {
97
-        setState(() {
98
-          userContent['phones'] = handlePhones;
99
-          userContent['code'] = handleCodes;
100
-        }),
101
-        print('我输入的信息:${userContent},手机号:${userContent['phones']}')
102
-      };
103
-
104
-  bool _checkValue = false;
105
-  bool _newValue = false;
106 86
 
87
+// 获取验证码
107 88
   void _buttonClickListen() {
108 89
     setState(() {
109 90
       if (isButtonEnable) {
@@ -114,17 +95,33 @@ class _RouteLogin extends State<MyRouteLogin> {
114 95
         } else {
115 96
           Fluttertoast.showToast(msg: '请正确输入手机号!');
116 97
         }
117
-
118
-        print('获取验证码按钮222222');
119 98
       }
120 99
     });
121 100
   }
101
+//登陆按钮
102
+  void _handelSubmit(){
103
+    if(handleCodes==''||handlePhones==''){
104
+      Fluttertoast.showToast(msg: '请输入验证码或手机号!');
105
+    }else{
106
+      if(_newValue){
107
+        print('已同意协议');
108
+        userLogin(handlePhones,handleCodes).then((value) {
109
+          userInfo(Person.fromJson(value.date.person));
110
+          Get.back();
111
+
112
+        });
113
+      }else{
114
+        Fluttertoast.showToast(msg: '请阅读并同意相关隐私政策!');
115
+      }
116
+    }
117
+  }
122 118
 
123 119
   @override
124 120
   Widget build(BuildContext context) {
125
-    return Container(
126
-      width: 250,
127
-      height: 250,
121
+    return Scaffold(
122
+      backgroundColor: Colors.transparent,
123
+      resizeToAvoidBottomInset: false,
124
+      body: Container(
128 125
       decoration: const BoxDecoration(
129 126
         image: DecorationImage(
130 127
           image: AssetImage("images/icon_login.png"),
@@ -132,9 +129,7 @@ class _RouteLogin extends State<MyRouteLogin> {
132 129
         ),
133 130
       ),
134 131
 
135
-      child: Scaffold(
136
-        backgroundColor: Colors.transparent, //把scaffold的背景色改成透明
137
-        body: Center(
132
+      child:  Container(
138 133
           child: Column(
139 134
             mainAxisAlignment: MainAxisAlignment.end,
140 135
             crossAxisAlignment: CrossAxisAlignment.start,
@@ -153,7 +148,6 @@ class _RouteLogin extends State<MyRouteLogin> {
153 148
                   fontSize: 35,
154 149
                 ),
155 150
               ),
156
-
157 151
               Cell(
158 152
                   // margin: EdgeInsets.symmetric(horizontal: 13.w),
159 153
                   margin: const EdgeInsets.fromLTRB(13, 43, 10, 0),
@@ -187,21 +181,7 @@ class _RouteLogin extends State<MyRouteLogin> {
187 181
                     child: ElevatedButton(
188 182
                       onPressed: () => {
189 183
                         setState(() {
190
-                          // _buttonClickListen();
191
-                          setState(() {
192
-                            if (isButtonEnable) {
193
-                              if (handlePhones != '') {
194
-                                isButtonEnable = false; //按钮状态标记
195
-                                _initTimer();
196
-                                getSMSCaptch(handlePhones);
197
-                              } else {
198
-                                Fluttertoast.showToast(msg: '请正确输入手机号!');
199
-                              }
200
-
201
-                              print('获取验证码按钮222222');
202
-                            }
203
-                          });
204
-
184
+                          _buttonClickListen();
205 185
                         })
206 186
                       },
207 187
                       child: Text(
@@ -222,8 +202,6 @@ class _RouteLogin extends State<MyRouteLogin> {
222 202
                       ),
223 203
                     ),
224 204
                   )),
225
-//          --------------FractionalOffset API--------------
226
-
227 205
               Cell(
228 206
                 // margin: EdgeInsets.symmetric(horizontal: 13.w),
229 207
                 margin: const EdgeInsets.fromLTRB(13, 16, 10, 0),
@@ -264,15 +242,7 @@ class _RouteLogin extends State<MyRouteLogin> {
264 242
                   height: 49.h,
265 243
                   child: ElevatedButton(
266 244
                     onPressed: () {
267
-                      if(handleCodes==''||handlePhones==''){
268
-                        Fluttertoast.showToast(msg: '请输入验证码或手机号!');
269
-                      }else{
270
-                        if(_newValue){
271
-                          print('已同意协议');
272
-                        }else{
273
-                          Fluttertoast.showToast(msg: '请阅读并同意相关隐私政策!');
274
-                        }
275
-                      }
245
+                      _handelSubmit();
276 246
                     },
277 247
                     child: const Text(
278 248
                       "登陆",
@@ -282,6 +252,7 @@ class _RouteLogin extends State<MyRouteLogin> {
282 252
                           fontWeight: FontWeight.bold),
283 253
                     ),
284 254
                     style: ButtonStyle(
255
+                      elevation: MaterialStateProperty.all(0),
285 256
                       backgroundColor:
286 257
                           MaterialStateProperty.all(const Color(0xFFFF703B)),
287 258
                       shape: MaterialStateProperty.all(
@@ -293,7 +264,7 @@ class _RouteLogin extends State<MyRouteLogin> {
293 264
                 ),
294 265
               ),
295 266
 
296
-              Padding(
267
+              Container(
297 268
                   padding: EdgeInsets.fromLTRB(10.0, 10, 10.0, 10),
298 269
                   child: Row(
299 270
                     children: <Widget>[
@@ -308,7 +279,7 @@ class _RouteLogin extends State<MyRouteLogin> {
308 279
                           }),
309 280
                       RichText(
310 281
                         text: TextSpan(children: <InlineSpan>[
311
-                          TextSpan(
282
+                          const TextSpan(
312 283
                               text: '请认真查看',
313 284
                               style: TextStyle(color: Color(0xff2a2a2a))),
314 285
                           TextSpan(
@@ -320,7 +291,7 @@ class _RouteLogin extends State<MyRouteLogin> {
320 291
                                     print('阅读已同意!!!');
321 292
                                   },
322 293
                           ),
323
-                          TextSpan(
294
+                          const TextSpan(
324 295
                               text: '确认之后选择此项',
325 296
                               style: TextStyle(color: Color(0xff2a2a2a))),
326 297
                         ]),

+ 39
- 0
lib/pages/main/index.dart Näytä tiedosto

@@ -0,0 +1,39 @@
1
+import 'package:farmer_client/pages/main/widgets/UserAddress.dart';
2
+import 'package:farmer_client/pages/main/widgets/UserInfo.dart';
3
+import 'package:flutter/material.dart';
4
+
5
+
6
+class MainPage extends StatefulWidget {
7
+  const MainPage({Key? key}) : super(key: key);
8
+
9
+  @override
10
+  State<MainPage> createState() => _MainPageState();
11
+}
12
+
13
+class _MainPageState extends State<MainPage> {
14
+  @override
15
+  Widget build(BuildContext context) {
16
+    return Scaffold(
17
+      resizeToAvoidBottomInset: false,
18
+      appBar:  AppBar(
19
+        title:  Text('我的'),
20
+        leading:  Icon(Icons.arrow_back_ios),
21
+        backgroundColor: Color(0xff4ceebe),
22
+        // backgroundColor: Colors.transparent,
23
+        centerTitle: true,
24
+
25
+      ),
26
+      body:Container(
27
+        alignment: Alignment.center,
28
+        child:   Column(
29
+          children: [
30
+            UserInfo(),
31
+            UserAddress()
32
+          ],
33
+        ),
34
+      )
35
+
36
+
37
+    );
38
+  }
39
+}

+ 0
- 0
lib/pages/main/widgets/OtherColumn.dart Näytä tiedosto


+ 98
- 0
lib/pages/main/widgets/UserAddress.dart Näytä tiedosto

@@ -0,0 +1,98 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+
4
+class UserAddress extends StatelessWidget {
5
+  const UserAddress({Key? key}) : super(key: key);
6
+
7
+  @override
8
+  Widget build(BuildContext context) {
9
+    return Container(
10
+        alignment: Alignment.center,
11
+        height: 123.w,
12
+        width: 345.w,
13
+        margin: EdgeInsets.fromLTRB(0, 15.w, 0, 15.w),
14
+        decoration: BoxDecoration(
15
+          borderRadius: BorderRadius.circular(30),
16
+          color: Colors.white,
17
+          boxShadow: [
18
+            BoxShadow(
19
+              blurRadius: 10, //阴影范围
20
+              spreadRadius: 0.1, //阴影浓度
21
+              color: Colors.grey.withOpacity(0.2), //阴影颜色
22
+            ),
23
+          ],
24
+        ),
25
+        child: Column(
26
+          children: [
27
+            Container(
28
+                margin: EdgeInsets.fromLTRB(0, 30.w, 0, 20.w),
29
+                alignment: Alignment.topLeft,
30
+                decoration: const BoxDecoration(
31
+                    border: Border(
32
+                        left: BorderSide(width: 5, color: Color(0xff000000)
33
+                            // 0x17000000
34
+                            ))),
35
+                child: Padding(
36
+                  padding: EdgeInsets.fromLTRB(12.w, 0, 0, 0),
37
+                  child: Text(
38
+                    '地址信息',
39
+                    style: TextStyle(
40
+                      color: Color(0xff333333),
41
+                      fontWeight: FontWeight.bold,
42
+                      fontSize: 17.sp,
43
+                    ),
44
+                  ),
45
+                )),
46
+            Row(
47
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
48
+              children: [
49
+                Container(
50
+                  child: Row(
51
+                    mainAxisAlignment: MainAxisAlignment.spaceBetween,
52
+                    children: [
53
+                      Padding(
54
+                        padding: EdgeInsets.fromLTRB(17.w, 0, 10.w, 0),
55
+                        child: Image(
56
+                          image: AssetImage('images/gpsImgae.png'),
57
+                          width: 12.w,
58
+                        ),
59
+                      ),
60
+                      Container(
61
+                        width: 260,
62
+                        child: GestureDetector(
63
+                          child: Text(
64
+                            '请填写详细地址请填写详细地址请填写详细地址',
65
+                            softWrap: true,
66
+                            maxLines: 1,
67
+                            textAlign: TextAlign.left,
68
+                            overflow: TextOverflow.ellipsis,
69
+                            style: TextStyle(
70
+                              fontWeight: FontWeight.bold,
71
+                              fontSize: 17,
72
+                            ),
73
+                          ),
74
+                          onTap: () {
75
+                            print('修改地址');
76
+                          },
77
+                        ),
78
+                      )
79
+                    ],
80
+                  ),
81
+                ),
82
+                Container(
83
+                  alignment: Alignment.center,
84
+                  padding: EdgeInsets.fromLTRB(0, 0, 30.w, 0),
85
+                  child: Text(
86
+                    '>>',
87
+                    style: TextStyle(
88
+                      fontWeight: FontWeight.bold,
89
+                      fontSize: 17,
90
+                    ),
91
+                  ),
92
+                ),
93
+              ],
94
+            ),
95
+          ],
96
+        ));
97
+  }
98
+}

+ 109
- 0
lib/pages/main/widgets/UserInfo.dart Näytä tiedosto

@@ -0,0 +1,109 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+
4
+class UserInfo extends StatelessWidget {
5
+  const UserInfo({Key? key}) : super(key: key);
6
+
7
+  @override
8
+  Widget build(BuildContext context) {
9
+    return Container(
10
+      alignment: Alignment.center,
11
+      height: 173.w,
12
+      width: 345.w,
13
+      decoration: BoxDecoration(
14
+        image: const DecorationImage(
15
+          image: AssetImage("images/mineBack.png"),
16
+          fit: BoxFit.cover,
17
+        ),
18
+        borderRadius: BorderRadius.circular(10),
19
+      ),
20
+      child: Stack(
21
+        fit: StackFit.expand,
22
+        children: [
23
+          Positioned(
24
+            top: 0,
25
+            right: 0,
26
+            child: Container(
27
+                alignment: Alignment.center,
28
+                height: 24.w,
29
+                width: 90.w,
30
+                decoration: const BoxDecoration(
31
+                  borderRadius: BorderRadius.only(
32
+                      bottomLeft: Radius.circular(20),
33
+                      topRight: Radius.circular(20)),
34
+                  color: Color(0x30000000),
35
+                ),
36
+                child: GestureDetector(
37
+                  child: const Text(
38
+                    '修改个人信息',
39
+                    style: TextStyle(color: Colors.white),
40
+                  ),
41
+                  onTap: () {
42
+                    print('修改个人信息');
43
+                  },
44
+                )),
45
+          ),
46
+          Row(
47
+            children: [
48
+              Column(
49
+                mainAxisAlignment: MainAxisAlignment.center,
50
+                children: [
51
+                  Container(
52
+                    decoration: BoxDecoration(
53
+                      shape: BoxShape.circle,
54
+                      border: Border.all(
55
+                        color: Colors.white,
56
+                        width: 2,
57
+                      ),
58
+                    ),
59
+                    margin: EdgeInsets.fromLTRB(30, 0, 15, 0),
60
+                    alignment: Alignment.center,
61
+                    child: Image.asset(
62
+                      "images/userMoren.png",
63
+                      width: 63.w,
64
+                    ),
65
+                  ),
66
+                ],
67
+              ),
68
+              Container(
69
+                child: Column(
70
+                  mainAxisAlignment: MainAxisAlignment.center,
71
+                  crossAxisAlignment: CrossAxisAlignment.start,
72
+                  children: [
73
+                    Container(
74
+                      margin: EdgeInsets.fromLTRB(0, 0, 0, 10),
75
+                      child: Text(
76
+                        '符西西',
77
+                        style: TextStyle(
78
+                          color: Colors.white,
79
+                          fontSize: 17,
80
+                        ),
81
+                      ),
82
+                    ),
83
+                    Container(
84
+                      margin: EdgeInsets.fromLTRB(0, 10, 0, 0),
85
+                      child: Text(
86
+                        '17775000245',
87
+                        style: TextStyle(
88
+                          color: Colors.white,
89
+                          fontSize: 17,
90
+                        ),
91
+                      ),
92
+                    ),
93
+                    // const Text(
94
+                    //      '点击登陆',
95
+                    //      style: TextStyle(
96
+                    //        color: Colors.white,
97
+                    //        fontSize: 17,
98
+                    //      ),
99
+                    //    ),
100
+                  ],
101
+                ),
102
+              ),
103
+            ],
104
+          ),
105
+        ],
106
+      ),
107
+    );
108
+  }
109
+}

+ 70
- 0
lib/pages/order/index.dart Näytä tiedosto

@@ -0,0 +1,70 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+
4
+import '../../widgets/OrderInfoCard.dart';
5
+
6
+
7
+
8
+
9
+
10
+class OrderPage extends StatefulWidget {
11
+  const OrderPage({Key? key}) : super(key: key);
12
+
13
+  @override
14
+  State<OrderPage> createState() => _OrderPageState();
15
+}
16
+
17
+class _OrderPageState extends State<OrderPage> {
18
+  @override
19
+  Widget build(BuildContext context) {
20
+    return Scaffold(
21
+      resizeToAvoidBottomInset: false,
22
+      appBar:  AppBar(
23
+        title:  Text('订单'),
24
+        leading:  Icon(Icons.arrow_back_ios),
25
+        backgroundColor: Color(0xff2b9270),
26
+        // backgroundColor: Colors.transparent,
27
+        centerTitle: true,
28
+
29
+      ),
30
+      body:      Column(
31
+        children: [
32
+          OrderInfoCard(),
33
+
34
+          Container(
35
+            height: 130.h,
36
+            margin: EdgeInsets.only(top: 20.0, bottom: 0.0),
37
+            alignment: Alignment.bottomCenter,
38
+            child: SizedBox(
39
+              width: 315.w,
40
+              height: 49.h,
41
+              child: ElevatedButton(
42
+                onPressed: () {
43
+                  // _handelSubmit();
44
+                  print('用户点击了支付啊阿松大撒地方');
45
+                },
46
+                child: const Text(
47
+                  "支付",
48
+                  style: TextStyle(
49
+                      fontSize: 18,
50
+                      color: Colors.white,
51
+                      fontWeight: FontWeight.bold),
52
+                ),
53
+                style: ButtonStyle(
54
+                  elevation: MaterialStateProperty.all(0),
55
+                  backgroundColor:
56
+                  MaterialStateProperty.all(const Color(0xFFFF703B)),
57
+                  shape: MaterialStateProperty.all(
58
+                      const RoundedRectangleBorder(
59
+                          borderRadius:
60
+                          BorderRadius.all(Radius.circular(24.4)))),
61
+                ),
62
+              ),
63
+            ),
64
+          ),
65
+        ],
66
+      ),
67
+    );
68
+
69
+  }
70
+}

+ 0
- 1
lib/pages/splash/splash.dart Näytä tiedosto

@@ -9,7 +9,6 @@ class SplashScreen extends StatelessWidget {
9 9
   handleOnFinish () {
10 10
     Get.off(Home(), routeName: '/');
11 11
   }
12
-
13 12
   @override
14 13
   Widget build(BuildContext context) {
15 14
     return countdown(3, handleOnFinish);

+ 1
- 1
lib/routes/middleWares.dart Näytä tiedosto

@@ -11,6 +11,6 @@ void routingCallback (routing) {
11 11
   if (!isLogin && !isSplashScreen && !isLoginPage) {
12 12
     // addPostFrameCallback 作用是等当前帧绘制完成之后再加载
13 13
     // https://github.com/jonataslaw/getx/issues/262
14
-    SchedulerBinding.instance?.addPostFrameCallback((_) => Get.toNamed('/login'));
14
+    SchedulerBinding.instance?.addPostFrameCallback((_) => Get.offNamed('/login'));
15 15
   }
16 16
 }

+ 7
- 4
lib/routes/pages.dart Näytä tiedosto

@@ -1,9 +1,12 @@
1 1
 
2 2
 import 'package:get/get.dart';
3
-import '../pages/index.dart';
3
+import '../pages/index.dart';//Home
4
+import '../pages/main/index.dart';
5
+import '../pages/order/index.dart';
6
+import '../widgets/OrderInfoCard.dart';
4 7
 
5 8
 List<GetPage> pages = [
6
-  GetPage(name: '/', page: () =>  Home()),
7
-  GetPage(name: '/splash', page: () => SplashScreen()),
8
-  GetPage(name: '/login', page: () =>  MyRouteLogin()),
9
+  GetPage(name: '/', page: () =>  MainPage()),
10
+  // GetPage(name: '/splash', page: () => SplashScreen()),
11
+  // GetPage(name: '/login', page: () =>  MyRouteLogin()),
9 12
 ];

+ 10
- 2
lib/services/user.dart Näytä tiedosto

@@ -6,8 +6,7 @@ import 'package:fluttertoast/fluttertoast.dart';
6 6
 
7 7
 
8 8
 Future getSMSCaptch(String phone) async {
9
-  return request('/sms-captcha', options: Options(method: 'POST'), queryParameters: { 'phone': phone })
10
-      .then((value) {
9
+  return request('/sms-captcha', options: Options(method: 'POST'), queryParameters: { 'phone': phone }).then((value) {
11 10
     Fluttertoast.showToast(
12 11
         msg: '验证码发送成功!'
13 12
     );
@@ -19,6 +18,15 @@ Future getSMSCaptch(String phone) async {
19 18
   });
20 19
 }
21 20
 
21
+//登陆
22
+Future userLogin(String userName,String password) async {
23
+  return request('/login', options: Options(method: 'POST'),
24
+    data: { 'userName': userName, 'password': password},).catchError((error) =>
25
+  { Fluttertoast.showToast(
26
+      msg: error.error['message']
27
+  ),});
28
+}
29
+
22 30
 Future getCurrent() async {
23 31
   return request('/person/current');
24 32
 }

+ 1
- 1
lib/utils/Request.dart Näytä tiedosto

@@ -52,7 +52,7 @@ Dio createRequest() {
52 52
       try {
53 53
         var data = response.data as Map<String, dynamic>;
54 54
         if (null != data['token']) {
55
-          GetStorage().write('token', data['token']);
55
+          GetStorage().write('token', data['token']); //取数据
56 56
         }
57 57
       } catch (e) {
58 58
         //

+ 14
- 20
lib/widgets/CarsCard.dart Näytä tiedosto

@@ -2,29 +2,23 @@ import 'package:flutter/foundation.dart';
2 2
 import 'package:flutter/material.dart';
3 3
 import 'package:flutter_screenutil/flutter_screenutil.dart';
4 4
 
5
-
6
-class CarItem {
7
-  late String name ;
8
-  late num? price ;
9
-  late num? distance ;
10
-
11
-
12
-  CarItem({ required this.name,this.price,this.distance});
13
-
14
-
15
-}
16
-
5
+// class CarItem {
6
+//   late String name;
7
+//   late num? price;
8
+//   late num? distance;
9
+//   CarItem({required this.name, this.price, this.distance});
10
+// }
17 11
 
18 12
 class CarsCard extends StatelessWidget {
19
-  final CarItem item;
20
-
13
+  // final CarItem item;
21 14
 
22
-  const CarsCard({Key? key, required this.item,}) : super(key: key);
15
+  // const CarsCard({
16
+  //   Key? key,
17
+  //   required this.item,
18
+  // }) : super(key: key);
23 19
 
24 20
   @override
25 21
   Widget build(BuildContext context) {
26
-
27
-
28 22
     return Container(
29 23
       decoration: BoxDecoration(
30 24
         color: Color(0xfff2f2f2),
@@ -46,8 +40,8 @@ class CarsCard extends StatelessWidget {
46 40
               verticalDirection: VerticalDirection.up,
47 41
               children: <Widget>[
48 42
                 Container(
49
-                  child:  Text(
50
-                    item.name,
43
+                  child: Text(
44
+                    '联合收割机GB01235-0B',
51 45
                     style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
52 46
                   ),
53 47
                 ),
@@ -89,7 +83,7 @@ class CarsCard extends StatelessWidget {
89 83
                     height: 44.h, //+10
90 84
                     child: ElevatedButton(
91 85
                       onPressed: () {
92
-                        print('点我去预约${item.name}');
86
+                        print('点我去预约');
93 87
                       },
94 88
                       child: const Text(
95 89
                         "预约",

+ 210
- 0
lib/widgets/OrderInfoCard.dart Näytä tiedosto

@@ -0,0 +1,210 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+
4
+class OrderInfoCard extends StatelessWidget {
5
+  const OrderInfoCard({Key? key}) : super(key: key);
6
+
7
+  @override
8
+  Widget build(BuildContext context) {
9
+    return Container(
10
+      width: 345.w,
11
+      height: 484.5.h,
12
+      margin: EdgeInsets.fromLTRB(15.w, 17.w, 15.w, 0),
13
+      decoration: BoxDecoration(
14
+        color: Colors.white,
15
+        //设置四周圆角 角度
16
+        borderRadius: BorderRadius.all(Radius.circular(2.0)),
17
+        //设置四周边框
18
+        boxShadow: [
19
+          BoxShadow(
20
+            blurRadius: 10, //阴影范围
21
+            spreadRadius: 0.1, //阴影浓度
22
+            color: Colors.grey.withOpacity(0.2), //阴影颜色
23
+          ),
24
+        ],
25
+      ),
26
+      child: Column(
27
+        crossAxisAlignment: CrossAxisAlignment.start,
28
+        children: [
29
+          Container(
30
+              margin: EdgeInsets.fromLTRB(15.w, 0, 0, 0),
31
+              child: Column(
32
+                crossAxisAlignment: CrossAxisAlignment.start,
33
+                children: [
34
+                  Container(
35
+                    padding: EdgeInsets.fromLTRB(0, 15, 0, 20),
36
+                    width: 314.w,
37
+                    decoration: const BoxDecoration(
38
+                        border: Border(
39
+                            bottom:
40
+                                BorderSide(width: 0.5, color: Color(0x20000000)
41
+                                    // 0x17000000
42
+                                    ))),
43
+                    child: RichText(
44
+                      text: const TextSpan(children: <InlineSpan>[
45
+                        TextSpan(
46
+                            text: '订单编号:',
47
+                            style: TextStyle(
48
+                                color: Color(0xff666666),
49
+                                fontSize: 16,
50
+                                fontWeight: FontWeight.bold)),
51
+                        TextSpan(
52
+                            text: 'XUHUI12345',
53
+                            style: TextStyle(
54
+                                color: Color(0xff222222),
55
+                                fontSize: 16,
56
+                                fontWeight: FontWeight.bold)),
57
+                      ]),
58
+                    ),
59
+                  ),
60
+                  Padding(
61
+                    padding: EdgeInsets.fromLTRB(0, 20, 0, 15),
62
+                    child: RichText(
63
+                      text: const TextSpan(children: <InlineSpan>[
64
+                        TextSpan(
65
+                            text: '农机名称:',
66
+                            style: TextStyle(
67
+                                color: Color(0xff666666),
68
+                                fontSize: 16,
69
+                                fontWeight: FontWeight.bold)),
70
+                        TextSpan(
71
+                            text: '老李家收割机MVGV-005',
72
+                            style: TextStyle(
73
+                                color: Color(0xff222222),
74
+                                fontSize: 16,
75
+                                fontWeight: FontWeight.bold)),
76
+                      ]),
77
+                    ),
78
+                  ),
79
+                  Padding(
80
+                    padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
81
+                    child: RichText(
82
+                      text: const TextSpan(children: <InlineSpan>[
83
+                        TextSpan(
84
+                            text: '作业面积:',
85
+                            style: TextStyle(
86
+                                color: Color(0xff666666),
87
+                                fontSize: 16,
88
+                                fontWeight: FontWeight.bold)),
89
+                        TextSpan(
90
+                            text: '1',
91
+                            style: TextStyle(
92
+                                color: Color(0xff222222),
93
+                                fontSize: 16,
94
+                                fontWeight: FontWeight.bold)),
95
+                      ]),
96
+                    ),
97
+                  ),
98
+                  Padding(
99
+                    padding: EdgeInsets.fromLTRB(0, 0, 0, 15),
100
+                    child: RichText(
101
+                      text: const TextSpan(children: <InlineSpan>[
102
+                        TextSpan(
103
+                            text: '需求时间:',
104
+                            style: TextStyle(
105
+                                color: Color(0xff666666),
106
+                                fontSize: 16,
107
+                                fontWeight: FontWeight.bold)),
108
+                        TextSpan(
109
+                            text: '2018-08-21',
110
+                            style: TextStyle(
111
+                                color: Color(0xff222222),
112
+                                fontSize: 16,
113
+                                fontWeight: FontWeight.bold)),
114
+                      ]),
115
+                    ),
116
+                  ),
117
+                  Padding(
118
+                    padding: EdgeInsets.fromLTRB(0, 0, 0, 20),
119
+                    child: RichText(
120
+                      text: const TextSpan(children: <InlineSpan>[
121
+                        TextSpan(
122
+                            text: '下单时间:',
123
+                            style: TextStyle(
124
+                                color: Color(0xff666666),
125
+                                fontSize: 16,
126
+                                fontWeight: FontWeight.bold)),
127
+                        TextSpan(
128
+                            text: '2022-04-13',
129
+                            style: TextStyle(
130
+                                color: Color(0xff222222),
131
+                                fontSize: 16,
132
+                                fontWeight: FontWeight.bold)),
133
+                      ]),
134
+                    ),
135
+                  ),
136
+                  Padding(
137
+                    padding: EdgeInsets.fromLTRB(0, 0, 0, 20),
138
+                    child: RichText(
139
+                      text: TextSpan(children: <InlineSpan>[
140
+                        TextSpan(
141
+                            text: '订单状态:',
142
+                            style: TextStyle(
143
+                                color: Color(0xff666666),
144
+                                fontSize: 16,
145
+                                fontWeight: FontWeight.bold)),
146
+                        TextSpan(
147
+                            text: '待付款',
148
+                            style: TextStyle(
149
+                                color: Color(0xff51D4FF),
150
+                                fontSize: 16,
151
+                                fontWeight: FontWeight.bold)),
152
+                      ]),
153
+                    ),
154
+                  ),
155
+                  Container(
156
+                      padding: EdgeInsets.fromLTRB(0, 20, 0, 0),
157
+                      width: 314.w,
158
+                      decoration: const BoxDecoration(
159
+                          border: Border(
160
+                              top: BorderSide(
161
+                                  width: 0.8, color: Color(0x20000000)
162
+                                  // 0x17000000
163
+                                  ))),
164
+                      child: Column(
165
+                        children: [
166
+                          Row(
167
+                            mainAxisAlignment: MainAxisAlignment.spaceBetween,
168
+                            children: [
169
+                              Text('费用:',
170
+                                  style: TextStyle(
171
+                                      color: Color(0xff666666),
172
+                                      fontSize: 16,
173
+                                      fontWeight: FontWeight.bold)),
174
+                              Text('8880',
175
+                                  style: TextStyle(
176
+                                      color: Color(0xffB61515),
177
+                                      fontSize: 16,
178
+                                      fontWeight: FontWeight.bold)),
179
+                            ],
180
+                          ),
181
+                          Padding(padding: EdgeInsets.fromLTRB(0, 30, 0, 0),
182
+                            child:  Row(
183
+                              mainAxisAlignment: MainAxisAlignment.spaceBetween,
184
+                              children: [
185
+                                Text('状态:',
186
+                                    style: TextStyle(
187
+                                        color: Color(0xff666666),
188
+                                        fontSize: 16,
189
+                                        fontWeight: FontWeight.bold)),
190
+                                Text('待付款',
191
+                                    style: TextStyle(
192
+                                        color: Color(0xff51D4FF),
193
+                                        fontSize: 16,
194
+                                        fontWeight: FontWeight.bold)),
195
+                              ],
196
+                            ),
197
+
198
+                          ),
199
+
200
+                        ],
201
+                      )),
202
+                ],
203
+              )),
204
+
205
+        ],
206
+      ),
207
+
208
+    );
209
+  }
210
+}

+ 1
- 1
lib/widgets/OrderListCard.dart Näytä tiedosto

@@ -106,7 +106,7 @@ class OrderListCard extends StatelessWidget {
106 106
                       child: RichText(
107 107
                         text: const TextSpan(children: <InlineSpan>[
108 108
                           TextSpan(
109
-                              text: '需求数量:',
109
+                              text: '作业面积:',
110 110
                               style: TextStyle(
111 111
                                   color: Color(0xff666666),
112 112
                                   fontSize: 16,

+ 67
- 67
pubspec.lock Näytä tiedosto

@@ -5,140 +5,140 @@ packages:
5 5
     dependency: transitive
6 6
     description:
7 7
       name: _fe_analyzer_shared
8
-      url: "https://pub.flutter-io.cn"
8
+      url: "https://pub.dartlang.org"
9 9
     source: hosted
10 10
     version: "38.0.0"
11 11
   analyzer:
12 12
     dependency: transitive
13 13
     description:
14 14
       name: analyzer
15
-      url: "https://pub.flutter-io.cn"
15
+      url: "https://pub.dartlang.org"
16 16
     source: hosted
17 17
     version: "3.4.1"
18 18
   args:
19 19
     dependency: transitive
20 20
     description:
21 21
       name: args
22
-      url: "https://pub.flutter-io.cn"
22
+      url: "https://pub.dartlang.org"
23 23
     source: hosted
24 24
     version: "2.3.0"
25 25
   async:
26 26
     dependency: transitive
27 27
     description:
28 28
       name: async
29
-      url: "https://pub.flutter-io.cn"
29
+      url: "https://pub.dartlang.org"
30 30
     source: hosted
31 31
     version: "2.8.2"
32 32
   boolean_selector:
33 33
     dependency: transitive
34 34
     description:
35 35
       name: boolean_selector
36
-      url: "https://pub.flutter-io.cn"
36
+      url: "https://pub.dartlang.org"
37 37
     source: hosted
38 38
     version: "2.1.0"
39 39
   build:
40 40
     dependency: transitive
41 41
     description:
42 42
       name: build
43
-      url: "https://pub.flutter-io.cn"
43
+      url: "https://pub.dartlang.org"
44 44
     source: hosted
45 45
     version: "2.2.1"
46 46
   build_config:
47 47
     dependency: transitive
48 48
     description:
49 49
       name: build_config
50
-      url: "https://pub.flutter-io.cn"
50
+      url: "https://pub.dartlang.org"
51 51
     source: hosted
52 52
     version: "1.0.0"
53 53
   characters:
54 54
     dependency: transitive
55 55
     description:
56 56
       name: characters
57
-      url: "https://pub.flutter-io.cn"
57
+      url: "https://pub.dartlang.org"
58 58
     source: hosted
59 59
     version: "1.2.0"
60 60
   charcode:
61 61
     dependency: transitive
62 62
     description:
63 63
       name: charcode
64
-      url: "https://pub.flutter-io.cn"
64
+      url: "https://pub.dartlang.org"
65 65
     source: hosted
66 66
     version: "1.3.1"
67 67
   checked_yaml:
68 68
     dependency: transitive
69 69
     description:
70 70
       name: checked_yaml
71
-      url: "https://pub.flutter-io.cn"
71
+      url: "https://pub.dartlang.org"
72 72
     source: hosted
73 73
     version: "2.0.1"
74 74
   clock:
75 75
     dependency: transitive
76 76
     description:
77 77
       name: clock
78
-      url: "https://pub.flutter-io.cn"
78
+      url: "https://pub.dartlang.org"
79 79
     source: hosted
80 80
     version: "1.1.0"
81 81
   collection:
82 82
     dependency: transitive
83 83
     description:
84 84
       name: collection
85
-      url: "https://pub.flutter-io.cn"
85
+      url: "https://pub.dartlang.org"
86 86
     source: hosted
87 87
     version: "1.15.0"
88 88
   convert:
89 89
     dependency: transitive
90 90
     description:
91 91
       name: convert
92
-      url: "https://pub.flutter-io.cn"
92
+      url: "https://pub.dartlang.org"
93 93
     source: hosted
94 94
     version: "3.0.1"
95 95
   crypto:
96 96
     dependency: transitive
97 97
     description:
98 98
       name: crypto
99
-      url: "https://pub.flutter-io.cn"
99
+      url: "https://pub.dartlang.org"
100 100
     source: hosted
101 101
     version: "3.0.1"
102 102
   cupertino_icons:
103 103
     dependency: "direct main"
104 104
     description:
105 105
       name: cupertino_icons
106
-      url: "https://pub.flutter-io.cn"
106
+      url: "https://pub.dartlang.org"
107 107
     source: hosted
108 108
     version: "1.0.4"
109 109
   dart_style:
110 110
     dependency: transitive
111 111
     description:
112 112
       name: dart_style
113
-      url: "https://pub.flutter-io.cn"
113
+      url: "https://pub.dartlang.org"
114 114
     source: hosted
115 115
     version: "2.2.2"
116 116
   dio:
117 117
     dependency: "direct main"
118 118
     description:
119 119
       name: dio
120
-      url: "https://pub.flutter-io.cn"
120
+      url: "https://pub.dartlang.org"
121 121
     source: hosted
122 122
     version: "4.0.6"
123 123
   fake_async:
124 124
     dependency: transitive
125 125
     description:
126 126
       name: fake_async
127
-      url: "https://pub.flutter-io.cn"
127
+      url: "https://pub.dartlang.org"
128 128
     source: hosted
129 129
     version: "1.2.0"
130 130
   ffi:
131 131
     dependency: transitive
132 132
     description:
133 133
       name: ffi
134
-      url: "https://pub.flutter-io.cn"
134
+      url: "https://pub.dartlang.org"
135 135
     source: hosted
136 136
     version: "1.1.2"
137 137
   file:
138 138
     dependency: transitive
139 139
     description:
140 140
       name: file
141
-      url: "https://pub.flutter-io.cn"
141
+      url: "https://pub.dartlang.org"
142 142
     source: hosted
143 143
     version: "6.1.2"
144 144
   flutter:
@@ -150,14 +150,14 @@ packages:
150 150
     dependency: "direct dev"
151 151
     description:
152 152
       name: flutter_lints
153
-      url: "https://pub.flutter-io.cn"
153
+      url: "https://pub.dartlang.org"
154 154
     source: hosted
155 155
     version: "1.0.4"
156 156
   flutter_screenutil:
157 157
     dependency: "direct main"
158 158
     description:
159 159
       name: flutter_screenutil
160
-      url: "https://pub.flutter-io.cn"
160
+      url: "https://pub.dartlang.org"
161 161
     source: hosted
162 162
     version: "5.4.0"
163 163
   flutter_test:
@@ -171,213 +171,213 @@ packages:
171 171
     source: sdk
172 172
     version: "0.0.0"
173 173
   fluttertoast:
174
-    dependency: "direct dev"
174
+    dependency: "direct main"
175 175
     description:
176 176
       name: fluttertoast
177
-      url: "https://pub.flutter-io.cn"
177
+      url: "https://pub.dartlang.org"
178 178
     source: hosted
179 179
     version: "8.0.9"
180 180
   get:
181 181
     dependency: "direct main"
182 182
     description:
183 183
       name: get
184
-      url: "https://pub.flutter-io.cn"
184
+      url: "https://pub.dartlang.org"
185 185
     source: hosted
186 186
     version: "4.6.1"
187 187
   get_storage:
188 188
     dependency: "direct main"
189 189
     description:
190 190
       name: get_storage
191
-      url: "https://pub.flutter-io.cn"
191
+      url: "https://pub.dartlang.org"
192 192
     source: hosted
193 193
     version: "2.0.3"
194 194
   glob:
195 195
     dependency: transitive
196 196
     description:
197 197
       name: glob
198
-      url: "https://pub.flutter-io.cn"
198
+      url: "https://pub.dartlang.org"
199 199
     source: hosted
200 200
     version: "2.0.2"
201 201
   http_parser:
202 202
     dependency: transitive
203 203
     description:
204 204
       name: http_parser
205
-      url: "https://pub.flutter-io.cn"
205
+      url: "https://pub.dartlang.org"
206 206
     source: hosted
207 207
     version: "4.0.0"
208 208
   js:
209 209
     dependency: transitive
210 210
     description:
211 211
       name: js
212
-      url: "https://pub.flutter-io.cn"
212
+      url: "https://pub.dartlang.org"
213 213
     source: hosted
214 214
     version: "0.6.3"
215 215
   json_annotation:
216 216
     dependency: transitive
217 217
     description:
218 218
       name: json_annotation
219
-      url: "https://pub.flutter-io.cn"
219
+      url: "https://pub.dartlang.org"
220 220
     source: hosted
221 221
     version: "4.4.0"
222 222
   json_serializable:
223 223
     dependency: "direct main"
224 224
     description:
225 225
       name: json_serializable
226
-      url: "https://pub.flutter-io.cn"
226
+      url: "https://pub.dartlang.org"
227 227
     source: hosted
228 228
     version: "6.1.5"
229 229
   lints:
230 230
     dependency: transitive
231 231
     description:
232 232
       name: lints
233
-      url: "https://pub.flutter-io.cn"
233
+      url: "https://pub.dartlang.org"
234 234
     source: hosted
235 235
     version: "1.0.1"
236 236
   location:
237 237
     dependency: "direct main"
238 238
     description:
239 239
       name: location
240
-      url: "https://pub.flutter-io.cn"
240
+      url: "https://pub.dartlang.org"
241 241
     source: hosted
242 242
     version: "4.3.0"
243 243
   location_platform_interface:
244 244
     dependency: transitive
245 245
     description:
246 246
       name: location_platform_interface
247
-      url: "https://pub.flutter-io.cn"
247
+      url: "https://pub.dartlang.org"
248 248
     source: hosted
249 249
     version: "2.3.0"
250 250
   location_web:
251 251
     dependency: transitive
252 252
     description:
253 253
       name: location_web
254
-      url: "https://pub.flutter-io.cn"
254
+      url: "https://pub.dartlang.org"
255 255
     source: hosted
256 256
     version: "3.1.1"
257 257
   logging:
258 258
     dependency: transitive
259 259
     description:
260 260
       name: logging
261
-      url: "https://pub.flutter-io.cn"
261
+      url: "https://pub.dartlang.org"
262 262
     source: hosted
263 263
     version: "1.0.2"
264 264
   matcher:
265 265
     dependency: transitive
266 266
     description:
267 267
       name: matcher
268
-      url: "https://pub.flutter-io.cn"
268
+      url: "https://pub.dartlang.org"
269 269
     source: hosted
270 270
     version: "0.12.11"
271 271
   material_color_utilities:
272 272
     dependency: transitive
273 273
     description:
274 274
       name: material_color_utilities
275
-      url: "https://pub.flutter-io.cn"
275
+      url: "https://pub.dartlang.org"
276 276
     source: hosted
277 277
     version: "0.1.3"
278 278
   meta:
279 279
     dependency: transitive
280 280
     description:
281 281
       name: meta
282
-      url: "https://pub.flutter-io.cn"
282
+      url: "https://pub.dartlang.org"
283 283
     source: hosted
284 284
     version: "1.7.0"
285 285
   package_config:
286 286
     dependency: transitive
287 287
     description:
288 288
       name: package_config
289
-      url: "https://pub.flutter-io.cn"
289
+      url: "https://pub.dartlang.org"
290 290
     source: hosted
291 291
     version: "2.0.2"
292 292
   path:
293 293
     dependency: transitive
294 294
     description:
295 295
       name: path
296
-      url: "https://pub.flutter-io.cn"
296
+      url: "https://pub.dartlang.org"
297 297
     source: hosted
298 298
     version: "1.8.0"
299 299
   path_provider:
300 300
     dependency: transitive
301 301
     description:
302 302
       name: path_provider
303
-      url: "https://pub.flutter-io.cn"
303
+      url: "https://pub.dartlang.org"
304 304
     source: hosted
305 305
     version: "2.0.9"
306 306
   path_provider_android:
307 307
     dependency: transitive
308 308
     description:
309 309
       name: path_provider_android
310
-      url: "https://pub.flutter-io.cn"
310
+      url: "https://pub.dartlang.org"
311 311
     source: hosted
312 312
     version: "2.0.12"
313 313
   path_provider_ios:
314 314
     dependency: transitive
315 315
     description:
316 316
       name: path_provider_ios
317
-      url: "https://pub.flutter-io.cn"
317
+      url: "https://pub.dartlang.org"
318 318
     source: hosted
319 319
     version: "2.0.8"
320 320
   path_provider_linux:
321 321
     dependency: transitive
322 322
     description:
323 323
       name: path_provider_linux
324
-      url: "https://pub.flutter-io.cn"
324
+      url: "https://pub.dartlang.org"
325 325
     source: hosted
326 326
     version: "2.1.5"
327 327
   path_provider_macos:
328 328
     dependency: transitive
329 329
     description:
330 330
       name: path_provider_macos
331
-      url: "https://pub.flutter-io.cn"
331
+      url: "https://pub.dartlang.org"
332 332
     source: hosted
333 333
     version: "2.0.5"
334 334
   path_provider_platform_interface:
335 335
     dependency: transitive
336 336
     description:
337 337
       name: path_provider_platform_interface
338
-      url: "https://pub.flutter-io.cn"
338
+      url: "https://pub.dartlang.org"
339 339
     source: hosted
340 340
     version: "2.0.3"
341 341
   path_provider_windows:
342 342
     dependency: transitive
343 343
     description:
344 344
       name: path_provider_windows
345
-      url: "https://pub.flutter-io.cn"
345
+      url: "https://pub.dartlang.org"
346 346
     source: hosted
347 347
     version: "2.0.5"
348 348
   platform:
349 349
     dependency: transitive
350 350
     description:
351 351
       name: platform
352
-      url: "https://pub.flutter-io.cn"
352
+      url: "https://pub.dartlang.org"
353 353
     source: hosted
354 354
     version: "3.1.0"
355 355
   plugin_platform_interface:
356 356
     dependency: transitive
357 357
     description:
358 358
       name: plugin_platform_interface
359
-      url: "https://pub.flutter-io.cn"
359
+      url: "https://pub.dartlang.org"
360 360
     source: hosted
361 361
     version: "2.1.2"
362 362
   process:
363 363
     dependency: transitive
364 364
     description:
365 365
       name: process
366
-      url: "https://pub.flutter-io.cn"
366
+      url: "https://pub.dartlang.org"
367 367
     source: hosted
368 368
     version: "4.2.4"
369 369
   pub_semver:
370 370
     dependency: transitive
371 371
     description:
372 372
       name: pub_semver
373
-      url: "https://pub.flutter-io.cn"
373
+      url: "https://pub.dartlang.org"
374 374
     source: hosted
375 375
     version: "2.1.1"
376 376
   pubspec_parse:
377 377
     dependency: transitive
378 378
     description:
379 379
       name: pubspec_parse
380
-      url: "https://pub.flutter-io.cn"
380
+      url: "https://pub.dartlang.org"
381 381
     source: hosted
382 382
     version: "1.2.0"
383 383
   sky_engine:
@@ -389,98 +389,98 @@ packages:
389 389
     dependency: transitive
390 390
     description:
391 391
       name: source_gen
392
-      url: "https://pub.flutter-io.cn"
392
+      url: "https://pub.dartlang.org"
393 393
     source: hosted
394 394
     version: "1.2.1"
395 395
   source_helper:
396 396
     dependency: transitive
397 397
     description:
398 398
       name: source_helper
399
-      url: "https://pub.flutter-io.cn"
399
+      url: "https://pub.dartlang.org"
400 400
     source: hosted
401 401
     version: "1.3.1"
402 402
   source_span:
403 403
     dependency: transitive
404 404
     description:
405 405
       name: source_span
406
-      url: "https://pub.flutter-io.cn"
406
+      url: "https://pub.dartlang.org"
407 407
     source: hosted
408 408
     version: "1.8.1"
409 409
   stack_trace:
410 410
     dependency: transitive
411 411
     description:
412 412
       name: stack_trace
413
-      url: "https://pub.flutter-io.cn"
413
+      url: "https://pub.dartlang.org"
414 414
     source: hosted
415 415
     version: "1.10.0"
416 416
   stream_channel:
417 417
     dependency: transitive
418 418
     description:
419 419
       name: stream_channel
420
-      url: "https://pub.flutter-io.cn"
420
+      url: "https://pub.dartlang.org"
421 421
     source: hosted
422 422
     version: "2.1.0"
423 423
   string_scanner:
424 424
     dependency: transitive
425 425
     description:
426 426
       name: string_scanner
427
-      url: "https://pub.flutter-io.cn"
427
+      url: "https://pub.dartlang.org"
428 428
     source: hosted
429 429
     version: "1.1.0"
430 430
   term_glyph:
431 431
     dependency: transitive
432 432
     description:
433 433
       name: term_glyph
434
-      url: "https://pub.flutter-io.cn"
434
+      url: "https://pub.dartlang.org"
435 435
     source: hosted
436 436
     version: "1.2.0"
437 437
   test_api:
438 438
     dependency: transitive
439 439
     description:
440 440
       name: test_api
441
-      url: "https://pub.flutter-io.cn"
441
+      url: "https://pub.dartlang.org"
442 442
     source: hosted
443 443
     version: "0.4.8"
444 444
   typed_data:
445 445
     dependency: transitive
446 446
     description:
447 447
       name: typed_data
448
-      url: "https://pub.flutter-io.cn"
448
+      url: "https://pub.dartlang.org"
449 449
     source: hosted
450 450
     version: "1.3.0"
451 451
   vector_math:
452 452
     dependency: transitive
453 453
     description:
454 454
       name: vector_math
455
-      url: "https://pub.flutter-io.cn"
455
+      url: "https://pub.dartlang.org"
456 456
     source: hosted
457 457
     version: "2.1.1"
458 458
   watcher:
459 459
     dependency: transitive
460 460
     description:
461 461
       name: watcher
462
-      url: "https://pub.flutter-io.cn"
462
+      url: "https://pub.dartlang.org"
463 463
     source: hosted
464 464
     version: "1.0.1"
465 465
   win32:
466 466
     dependency: transitive
467 467
     description:
468 468
       name: win32
469
-      url: "https://pub.flutter-io.cn"
469
+      url: "https://pub.dartlang.org"
470 470
     source: hosted
471 471
     version: "2.5.1"
472 472
   xdg_directories:
473 473
     dependency: transitive
474 474
     description:
475 475
       name: xdg_directories
476
-      url: "https://pub.flutter-io.cn"
476
+      url: "https://pub.dartlang.org"
477 477
     source: hosted
478 478
     version: "0.2.0+1"
479 479
   yaml:
480 480
     dependency: transitive
481 481
     description:
482 482
       name: yaml
483
-      url: "https://pub.flutter-io.cn"
483
+      url: "https://pub.dartlang.org"
484 484
     source: hosted
485 485
     version: "3.1.0"
486 486
 sdks:

+ 3
- 0
pubspec.yaml Näytä tiedosto

@@ -39,6 +39,7 @@ dependencies:
39 39
   dio: ^4.0.6
40 40
   flutter_screenutil: ^5.3.1
41 41
   get_storage: ^2.0.3
42
+  fluttertoast: ^8.0.9
42 43
   location: ^4.3.0
43 44
 
44 45
 dev_dependencies:
@@ -79,6 +80,8 @@ flutter:
79 80
     - images/cars.png
80 81
     - images/gpsImgae.png
81 82
     - images/ordersLeft.png
83
+    - images/mineBack.png
84
+    - images/userMoren.png
82 85
 
83 86
   # An image asset can refer to one or more resolution-specific "variants", see
84 87
   # https://flutter.dev/assets-and-images/#resolution-aware.