[baozhangchao] 3 years ago
parent
commit
ed99598ab6

+ 1
- 1
android/app/src/main/res/drawable-v21/launch_background.xml View File

@@ -3,7 +3,7 @@
3 3
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4 4
     <item android:drawable="?android:colorBackground" />
5 5
 
6
-    <!-- You can insert your own image assets here -->
6
+    <!-- You can insert your own image images here -->
7 7
     <!-- <item>
8 8
         <bitmap
9 9
             android:gravity="center"

+ 1
- 1
android/app/src/main/res/drawable/launch_background.xml View File

@@ -3,7 +3,7 @@
3 3
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4 4
     <item android:drawable="@android:color/white" />
5 5
 
6
-    <!-- You can insert your own image assets here -->
6
+    <!-- You can insert your own image images here -->
7 7
     <!-- <item>
8 8
         <bitmap
9 9
             android:gravity="center"

BIN
images/icon_login.png View File


+ 89
- 0
lib/components/UI/DefaultButton.dart View File

@@ -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
+

+ 24
- 17
lib/main.dart View File

@@ -1,7 +1,12 @@
1
+import 'dart:async';
1 2
 
2 3
 import 'package:farmer_client/models/Store.dart';
4
+import 'package:farmer_client/pages/login/login.dart';
3 5
 import 'package:flutter/material.dart';
4 6
 import 'package:get/get.dart';
7
+import 'package:flutter_screenutil/flutter_screenutil.dart';
8
+
9
+import 'components/UI/DefaultButton.dart';
5 10
 
6 11
 void main() {
7 12
   runApp(const MyApp());
@@ -55,20 +60,8 @@ class MyHomePage extends StatefulWidget {
55 60
 class _MyHomePageState extends State<MyHomePage> {
56 61
   int _counter = 0;
57 62
 
58
-  void _incrementCounter() {
59
-    setState(() {
60
-      // This call to setState tells the Flutter framework that something has
61
-      // changed in this State, which causes it to rerun the build method below
62
-      // so that the display can reflect the updated values. If we changed
63
-      // _counter without calling setState(), then the build method would not be
64
-      // called again, and so nothing would appear to happen.
65
-      _counter++;
66
-    });
67
-  }
68
-
69 63
   @override
70 64
   Widget build(BuildContext context) {
71
-
72 65
     // var find = Get.find(tag: 'user');
73 66
 
74 67
     // This method is rerun every time setState is called, for instance as done
@@ -79,6 +72,7 @@ class _MyHomePageState extends State<MyHomePage> {
79 72
     // than having to individually change instances of widgets.
80 73
     return Scaffold(
81 74
       appBar: AppBar(
75
+        backgroundColor: Colors.amber,
82 76
         // Here we take the value from the MyHomePage object that was created by
83 77
         // the App.build method, and use it to set our appbar title.
84 78
         title: Text(widget.title),
@@ -110,14 +104,27 @@ class _MyHomePageState extends State<MyHomePage> {
110 104
               '$_counter',
111 105
               style: Theme.of(context).textTheme.headline4,
112 106
             ),
107
+            DefaultButton(
108
+              margin: EdgeInsets.fromLTRB(0, 30.0, 0, 0), //可选配置,自定义控件中有默认配置
109
+              text: "登陆",
110
+              width: 120.0,
111
+              height: 50.0,
112
+              fontSize: 20.0,
113
+              backColor: Color(0xffff703b),
114
+              color: Colors.white,
115
+              onPressed: () {
116
+                Navigator.push(
117
+                  context,
118
+                  MaterialPageRoute(builder: (context) {
119
+                    return MyRouteLogin();
120
+                  }),
121
+                );
122
+              },
123
+            ),
113 124
           ],
114 125
         ),
115 126
       ),
116
-      floatingActionButton: FloatingActionButton(
117
-        onPressed: _incrementCounter,
118
-        tooltip: 'Increment',
119
-        child: const Icon(Icons.add),
120
-      ), // This trailing comma makes auto-formatting nicer for build methods.
127
+      // This trailing comma makes auto-formatting nicer for build methods.
121 128
     );
122 129
   }
123 130
 }

+ 223
- 0
lib/pages/login/login.dart View File

@@ -0,0 +1,223 @@
1
+
2
+
3
+import 'dart:async';
4
+
5
+import 'package:farmer_client/components/UI/DefaultButton.dart';
6
+import 'package:flutter/material.dart';
7
+import 'package:flutter_screenutil/flutter_screenutil.dart';
8
+
9
+
10
+
11
+class MyRouteLogin extends StatefulWidget {
12
+  @override
13
+  State<MyRouteLogin> createState() => _RouteLogin();
14
+}
15
+
16
+class _RouteLogin extends State<MyRouteLogin> {
17
+  bool isButtonEnable = true; //按钮状态  是否可点击
18
+  String buttonText = '发送验证码'; //初始文本
19
+  int count = 5; //初始倒计时时间
20
+  var timer; //倒计时的计时器
21
+  TextEditingController mController = TextEditingController();
22
+  void _buttonClickListen() {
23
+    print('获取验证码按钮');
24
+    setState(() {
25
+      if (isButtonEnable) {
26
+        //当按钮可点击时
27
+        isButtonEnable = false; //按钮状态标记
28
+        _initTimer();
29
+        return null; //返回null按钮禁止点击
30
+      } else {
31
+        //当按钮不可点击时
32
+//        debugPrint('false');
33
+        return null; //返回null按钮禁止点击
34
+      }
35
+    });
36
+  }
37
+
38
+  void _initTimer() {
39
+    timer = new Timer.periodic(Duration(seconds: 1), (Timer timer) {
40
+      count--;
41
+      setState(() {
42
+        if (count == 0) {
43
+          timer.cancel(); //倒计时结束取消定时器
44
+          isButtonEnable = true; //按钮可点击
45
+          count = 5; //重置时间
46
+          buttonText = '发送验证码'; //重置按钮文本
47
+        } else {
48
+          buttonText = '重新发送($count)'; //更新文本内容
49
+        }
50
+      });
51
+    });
52
+  }
53
+
54
+  @override
55
+  void dispose() {
56
+    timer?.cancel(); //销毁计时器
57
+    timer = null;
58
+    mController.dispose();
59
+    super.dispose();
60
+  }
61
+
62
+// -------------逻辑分割-------------------------------------------
63
+  var handlePhones = '';
64
+  var handleCodes = '';
65
+
66
+  void _handlePhone(e) => {
67
+    setState(() => {handlePhones = e})
68
+  };
69
+
70
+  void _handleCode(e) => {
71
+    setState(() => {handleCodes = e})
72
+  };
73
+
74
+  var userContent = {'phones': '', 'code': ''};
75
+
76
+  void phoneUser() => {
77
+    setState(() {
78
+      userContent['phones'] = handlePhones;
79
+      userContent['code'] = handleCodes;
80
+    }),
81
+    print('我输入的信息:${userContent},手机号:${userContent['phones']}')
82
+  };
83
+
84
+  @override
85
+  Widget build(BuildContext context) {
86
+    return Container(
87
+        width: 12.w,
88
+        decoration: const BoxDecoration(
89
+          image: DecorationImage(
90
+            image: AssetImage("images/icon_login.png"),
91
+            fit: BoxFit.cover,
92
+          ),
93
+        ),
94
+        child: Scaffold(
95
+            backgroundColor: Colors.transparent, //把scaffold的背景色改成透明
96
+            appBar: AppBar(
97
+              backgroundColor: Colors.transparent, //把appbar的背景色改成透明
98
+              // elevation: 0,//appbar的阴影
99
+              title: const Text('登陆'),
100
+            ),
101
+            body: Center(
102
+                child: Column(
103
+                  crossAxisAlignment: CrossAxisAlignment.start,
104
+                  children: <Widget>[
105
+                    Text(
106
+                      '您好!',
107
+                      style: TextStyle(
108
+                        fontWeight: FontWeight.bold,
109
+                        fontSize: 50,
110
+                      ),
111
+                    ),
112
+                    Text(
113
+                      '欢迎进入农户端应用!',
114
+                      style: TextStyle(
115
+                        fontWeight: FontWeight.bold,
116
+                        fontSize: 35,
117
+                      ),
118
+                    ),
119
+
120
+                    Container(
121
+                      // margin: EdgeInsets.fromLTRB(5,0,0,0),
122
+                        decoration: BoxDecoration(
123
+                            border: Border(
124
+                                bottom: BorderSide(
125
+                                    width: 1, color: Color(0xffe5e5e5)))),
126
+                        child: Flex(
127
+                          direction: Axis.horizontal,
128
+                          children: <Widget>[
129
+                            Expanded(
130
+                              child: TextField(
131
+                                autofocus: true,
132
+                                maxLength: 11,
133
+                                keyboardType: TextInputType.number,
134
+                                cursorColor: Color(0xD4D4D4FF),
135
+                                decoration: const InputDecoration(
136
+                                  contentPadding:EdgeInsets.fromLTRB(30.0, 0, 0, 0),
137
+                                  hintText: "请输入手机号",
138
+                                  prefixIcon: Icon(Icons.phone_iphone_outlined),
139
+                                  counterText: '',
140
+                                  border: OutlineInputBorder(
141
+                                      borderSide: BorderSide.none),
142
+                                ),
143
+                                onChanged: (e) {
144
+                                  _handlePhone(e);
145
+                                  // phoneUser(e);
146
+                                },
147
+                              ),
148
+                            ),
149
+                            Container(
150
+                              width: 100.0,
151
+                              child: SizedBox(
152
+                                child: FlatButton(
153
+                                  disabledColor:
154
+                                  Colors.grey.withOpacity(0.1), //按钮禁用时的颜色
155
+                                  disabledTextColor: Colors.white, //按钮禁用时的文本颜色
156
+                                  textColor: isButtonEnable
157
+                                      ? Colors.white
158
+                                      : Colors.black.withOpacity(0.2), //文本颜色
159
+                                  color: isButtonEnable
160
+                                      ? Color(0xffff703b)
161
+                                      : Colors.grey.withOpacity(0.1), //按钮的颜色
162
+                                  splashColor: isButtonEnable
163
+                                      ? Colors.white.withOpacity(0.1)
164
+                                      : Colors.transparent,
165
+                                  shape: StadiumBorder(side: BorderSide.none),
166
+                                  onPressed: () {
167
+                                    setState(() {
168
+                                      if (isButtonEnable) {
169
+                                        _buttonClickListen();
170
+                                      } else {
171
+                                        return;
172
+                                      }
173
+                                    });
174
+                                  },
175
+                                  child: Text(
176
+                                    '$buttonText',
177
+                                    style: TextStyle(
178
+                                      fontSize: 13,
179
+
180
+                                    ),
181
+                                  ),
182
+                                ),
183
+                              ),
184
+                            ),
185
+                          ],
186
+                        )),
187
+
188
+                    TextField(
189
+                      keyboardType: TextInputType.number,
190
+                      cursorColor: Color(0xD4D4D4FF),
191
+                      decoration: const InputDecoration(
192
+                          hintText: "请输入验证码",
193
+                          prefixIcon: Icon(Icons.beenhere)),
194
+                      onChanged: (e) {
195
+                        _handleCode(e);
196
+                      },
197
+                    ),
198
+                    // 登录按钮
199
+
200
+                    Container(
201
+                      child: DefaultButton(
202
+                        margin:
203
+                        EdgeInsets.fromLTRB(0, 30.0, 0, 0), //可选配置,自定义控件中有默认配置
204
+                        text: "登陆",
205
+                        width: 200.0,
206
+                        height: 50.0,
207
+                        fontSize: 20.0,
208
+                        backColor: Color(0xffff703b),
209
+                        color: Colors.white,
210
+                        onPressed: () {
211
+                          Navigator.push(
212
+                            context,
213
+                            MaterialPageRoute(builder: (context) {
214
+                              return MyRouteLogin();
215
+                            }),
216
+                          );
217
+                        },
218
+                      ),
219
+                    )
220
+                  ],
221
+                ))));
222
+  }
223
+}

+ 53
- 46
pubspec.lock View File

@@ -5,133 +5,133 @@ 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
   file:
131 131
     dependency: transitive
132 132
     description:
133 133
       name: file
134
-      url: "https://pub.flutter-io.cn"
134
+      url: "https://pub.dartlang.org"
135 135
     source: hosted
136 136
     version: "6.1.2"
137 137
   flutter:
@@ -143,9 +143,16 @@ packages:
143 143
     dependency: "direct dev"
144 144
     description:
145 145
       name: flutter_lints
146
-      url: "https://pub.flutter-io.cn"
146
+      url: "https://pub.dartlang.org"
147 147
     source: hosted
148 148
     version: "1.0.4"
149
+  flutter_screenutil:
150
+    dependency: "direct dev"
151
+    description:
152
+      name: flutter_screenutil
153
+      url: "https://pub.dartlang.org"
154
+    source: hosted
155
+    version: "5.3.1"
149 156
   flutter_test:
150 157
     dependency: "direct dev"
151 158
     description: flutter
@@ -155,98 +162,98 @@ packages:
155 162
     dependency: "direct main"
156 163
     description:
157 164
       name: get
158
-      url: "https://pub.flutter-io.cn"
165
+      url: "https://pub.dartlang.org"
159 166
     source: hosted
160 167
     version: "4.6.1"
161 168
   glob:
162 169
     dependency: transitive
163 170
     description:
164 171
       name: glob
165
-      url: "https://pub.flutter-io.cn"
172
+      url: "https://pub.dartlang.org"
166 173
     source: hosted
167 174
     version: "2.0.2"
168 175
   http_parser:
169 176
     dependency: transitive
170 177
     description:
171 178
       name: http_parser
172
-      url: "https://pub.flutter-io.cn"
179
+      url: "https://pub.dartlang.org"
173 180
     source: hosted
174 181
     version: "4.0.0"
175 182
   json_annotation:
176 183
     dependency: transitive
177 184
     description:
178 185
       name: json_annotation
179
-      url: "https://pub.flutter-io.cn"
186
+      url: "https://pub.dartlang.org"
180 187
     source: hosted
181 188
     version: "4.4.0"
182 189
   json_serializable:
183 190
     dependency: "direct main"
184 191
     description:
185 192
       name: json_serializable
186
-      url: "https://pub.flutter-io.cn"
193
+      url: "https://pub.dartlang.org"
187 194
     source: hosted
188 195
     version: "6.1.5"
189 196
   lints:
190 197
     dependency: transitive
191 198
     description:
192 199
       name: lints
193
-      url: "https://pub.flutter-io.cn"
200
+      url: "https://pub.dartlang.org"
194 201
     source: hosted
195 202
     version: "1.0.1"
196 203
   logging:
197 204
     dependency: transitive
198 205
     description:
199 206
       name: logging
200
-      url: "https://pub.flutter-io.cn"
207
+      url: "https://pub.dartlang.org"
201 208
     source: hosted
202 209
     version: "1.0.2"
203 210
   matcher:
204 211
     dependency: transitive
205 212
     description:
206 213
       name: matcher
207
-      url: "https://pub.flutter-io.cn"
214
+      url: "https://pub.dartlang.org"
208 215
     source: hosted
209 216
     version: "0.12.11"
210 217
   material_color_utilities:
211 218
     dependency: transitive
212 219
     description:
213 220
       name: material_color_utilities
214
-      url: "https://pub.flutter-io.cn"
221
+      url: "https://pub.dartlang.org"
215 222
     source: hosted
216 223
     version: "0.1.3"
217 224
   meta:
218 225
     dependency: transitive
219 226
     description:
220 227
       name: meta
221
-      url: "https://pub.flutter-io.cn"
228
+      url: "https://pub.dartlang.org"
222 229
     source: hosted
223 230
     version: "1.7.0"
224 231
   package_config:
225 232
     dependency: transitive
226 233
     description:
227 234
       name: package_config
228
-      url: "https://pub.flutter-io.cn"
235
+      url: "https://pub.dartlang.org"
229 236
     source: hosted
230 237
     version: "2.0.2"
231 238
   path:
232 239
     dependency: transitive
233 240
     description:
234 241
       name: path
235
-      url: "https://pub.flutter-io.cn"
242
+      url: "https://pub.dartlang.org"
236 243
     source: hosted
237 244
     version: "1.8.0"
238 245
   pub_semver:
239 246
     dependency: transitive
240 247
     description:
241 248
       name: pub_semver
242
-      url: "https://pub.flutter-io.cn"
249
+      url: "https://pub.dartlang.org"
243 250
     source: hosted
244 251
     version: "2.1.1"
245 252
   pubspec_parse:
246 253
     dependency: transitive
247 254
     description:
248 255
       name: pubspec_parse
249
-      url: "https://pub.flutter-io.cn"
256
+      url: "https://pub.dartlang.org"
250 257
     source: hosted
251 258
     version: "1.2.0"
252 259
   sky_engine:
@@ -258,84 +265,84 @@ packages:
258 265
     dependency: transitive
259 266
     description:
260 267
       name: source_gen
261
-      url: "https://pub.flutter-io.cn"
268
+      url: "https://pub.dartlang.org"
262 269
     source: hosted
263 270
     version: "1.2.1"
264 271
   source_helper:
265 272
     dependency: transitive
266 273
     description:
267 274
       name: source_helper
268
-      url: "https://pub.flutter-io.cn"
275
+      url: "https://pub.dartlang.org"
269 276
     source: hosted
270 277
     version: "1.3.1"
271 278
   source_span:
272 279
     dependency: transitive
273 280
     description:
274 281
       name: source_span
275
-      url: "https://pub.flutter-io.cn"
282
+      url: "https://pub.dartlang.org"
276 283
     source: hosted
277 284
     version: "1.8.1"
278 285
   stack_trace:
279 286
     dependency: transitive
280 287
     description:
281 288
       name: stack_trace
282
-      url: "https://pub.flutter-io.cn"
289
+      url: "https://pub.dartlang.org"
283 290
     source: hosted
284 291
     version: "1.10.0"
285 292
   stream_channel:
286 293
     dependency: transitive
287 294
     description:
288 295
       name: stream_channel
289
-      url: "https://pub.flutter-io.cn"
296
+      url: "https://pub.dartlang.org"
290 297
     source: hosted
291 298
     version: "2.1.0"
292 299
   string_scanner:
293 300
     dependency: transitive
294 301
     description:
295 302
       name: string_scanner
296
-      url: "https://pub.flutter-io.cn"
303
+      url: "https://pub.dartlang.org"
297 304
     source: hosted
298 305
     version: "1.1.0"
299 306
   term_glyph:
300 307
     dependency: transitive
301 308
     description:
302 309
       name: term_glyph
303
-      url: "https://pub.flutter-io.cn"
310
+      url: "https://pub.dartlang.org"
304 311
     source: hosted
305 312
     version: "1.2.0"
306 313
   test_api:
307 314
     dependency: transitive
308 315
     description:
309 316
       name: test_api
310
-      url: "https://pub.flutter-io.cn"
317
+      url: "https://pub.dartlang.org"
311 318
     source: hosted
312 319
     version: "0.4.8"
313 320
   typed_data:
314 321
     dependency: transitive
315 322
     description:
316 323
       name: typed_data
317
-      url: "https://pub.flutter-io.cn"
324
+      url: "https://pub.dartlang.org"
318 325
     source: hosted
319 326
     version: "1.3.0"
320 327
   vector_math:
321 328
     dependency: transitive
322 329
     description:
323 330
       name: vector_math
324
-      url: "https://pub.flutter-io.cn"
331
+      url: "https://pub.dartlang.org"
325 332
     source: hosted
326 333
     version: "2.1.1"
327 334
   watcher:
328 335
     dependency: transitive
329 336
     description:
330 337
       name: watcher
331
-      url: "https://pub.flutter-io.cn"
338
+      url: "https://pub.dartlang.org"
332 339
     source: hosted
333 340
     version: "1.0.1"
334 341
   yaml:
335 342
     dependency: transitive
336 343
     description:
337 344
       name: yaml
338
-      url: "https://pub.flutter-io.cn"
345
+      url: "https://pub.dartlang.org"
339 346
     source: hosted
340 347
     version: "3.1.0"
341 348
 sdks:

+ 5
- 7
pubspec.yaml View File

@@ -49,7 +49,7 @@ dev_dependencies:
49 49
   # rules and activating additional ones.
50 50
   flutter_lints: ^1.0.0
51 51
   json_serializable: ^6.1.5
52
-
52
+  flutter_screenutil: ^5.3.1
53 53
 # For information on the generic Dart part of this file, see the
54 54
 # following page: https://dart.dev/tools/pub/pubspec
55 55
 
@@ -60,16 +60,14 @@ flutter:
60 60
   # included with your application, so that you can use the icons in
61 61
   # the material Icons class.
62 62
   uses-material-design: true
63
-
64
-  # To add assets to your application, add an assets section, like this:
65
-  # assets:
66
-  #   - images/a_dot_burr.jpeg
67
-  #   - images/a_dot_ham.jpeg
63
+  # To add images to your application, add an images section, like this:
64
+  assets:
65
+    - images/icon_login.png
68 66
 
69 67
   # An image asset can refer to one or more resolution-specific "variants", see
70 68
   # https://flutter.dev/assets-and-images/#resolution-aware.
71 69
 
72
-  # For details regarding adding assets from package dependencies, see
70
+  # For details regarding adding images from package dependencies, see
73 71
   # https://flutter.dev/assets-and-images/#from-packages
74 72
 
75 73
   # To add custom fonts to your application, add a fonts section here,