[baozhangchao] 3 年之前
父節點
當前提交
3afaa5479c
共有 6 個文件被更改,包括 244 次插入82 次删除
  1. 8
    0
      lib/services/user.dart
  2. 45
    34
      lib/utils/Request.dart
  3. 54
    0
      lib/widgets/Cell.dart
  4. 88
    0
      lib/widgets/GradientButton.dart
  5. 48
    48
      pubspec.lock
  6. 1
    0
      pubspec.yaml

+ 8
- 0
lib/services/user.dart 查看文件

1
+
2
+import 'package:dio/dio.dart';
3
+import 'package:farmer_client/utils/Request.dart';
4
+import 'package:flutter/foundation.dart';
5
+
6
+Future getSMSCaptch(String phone) async {
7
+  return request('/sms-captcha', options: Options(method: 'POST'), queryParameters: { 'phone': phone });
8
+}

+ 45
- 34
lib/utils/Request.dart 查看文件

1
-
2
 import 'dart:convert';
1
 import 'dart:convert';
3
 
2
 
4
 import 'package:dio/dio.dart';
3
 import 'package:dio/dio.dart';
4
+import 'package:flutter/foundation.dart';
5
+import 'package:get/get.dart';
5
 
6
 
6
 class Response {
7
 class Response {
7
   late int code;
8
   late int code;
14
     this.data,
15
     this.data,
15
   });
16
   });
16
 
17
 
17
-  factory Response.fromJson(dynamic str) => Response.fromMap(jsonDecode(str) as Map<String, dynamic>);
18
+  factory Response.fromJson(dynamic str) =>
19
+      Response.fromMap(jsonDecode(str) as Map<String, dynamic>);
18
 
20
 
19
   factory Response.fromMap(Map<String, dynamic> resp) => Response(
21
   factory Response.fromMap(Map<String, dynamic> resp) => Response(
20
-    code: resp['code'],
21
-    message: resp['message'],
22
-    data: resp['data'],
23
-  );
22
+        code: resp['code'],
23
+        message: resp['message'],
24
+        data: resp['data'],
25
+      );
24
 }
26
 }
25
 
27
 
28
+final client = GetPlatform.isAndroid ? 'android' : 'ios';
29
+
26
 Dio createRequest() {
30
 Dio createRequest() {
27
   var options = BaseOptions(
31
   var options = BaseOptions(
28
-    baseUrl: 'https://www.xx.com/api',
32
+    baseUrl: 'https://machine.njyunzhi.com/api/' + client + '/farmer',
29
     connectTimeout: 5000,
33
     connectTimeout: 5000,
30
     receiveTimeout: 3000,
34
     receiveTimeout: 3000,
31
   );
35
   );
32
 
36
 
33
   var dio = Dio(options);
37
   var dio = Dio(options);
34
-  dio.interceptors.add(InterceptorsWrapper(
35
-      onRequest:(options, handler){
36
-        // Do something before request is sent
37
-        return handler.next(options); //continue
38
-        // If you want to resolve the request with some custom data,
39
-        // you can resolve a `Response` object eg: `handler.resolve(response)`.
40
-        // If you want to reject the request with a error message,
41
-        // you can reject a `DioError` object eg: `handler.reject(dioError)`
42
-      },
43
-      onResponse:(response,handler) {
44
-        Response resp = Response.fromJson(response.data['data']);
45
-        if (resp.code == 1000) {
46
-          response.data = resp.data;
47
-          return handler.next(response);
48
-        } else {
49
-          return handler.reject(response.data);
50
-        }
51
-      },
52
-      onError: (DioError e, handler) {
53
-        // Do something with response error
54
-        return  handler.next(e);//continue
55
-        // If you want to resolve the request with some custom data,
56
-        // you can resolve a `Response` object eg: `handler.resolve(response)`.
57
-      }
58
-  ));
38
+  dio.interceptors.add(InterceptorsWrapper(onRequest: (options, handler) {
39
+    // Do something before request is sent
40
+    return handler.next(options); //continue
41
+    // If you want to resolve the request with some custom data,
42
+    // you can resolve a `Response` object eg: `handler.resolve(response)`.
43
+    // If you want to reject the request with a error message,
44
+    // you can reject a `DioError` object eg: `handler.reject(dioError)`
45
+  }, onResponse: (response, handler) {
46
+    var resp = response.data as Map<String, dynamic>;
47
+    if (resp['code'] == 1000) {
48
+      response.data = resp['data'];
49
+      return handler.next(response);
50
+    } else {
51
+      return handler.reject(response.data);
52
+    }
53
+  }, onError: (DioError e, handler) {
54
+    // Do something with response error
55
+    return handler.next(e); //continue
56
+    // If you want to resolve the request with some custom data,
57
+    // you can resolve a `Response` object eg: `handler.resolve(response)`.
58
+  }));
59
 
59
 
60
   return dio;
60
   return dio;
61
 }
61
 }
62
 
62
 
63
 var instance = createRequest();
63
 var instance = createRequest();
64
 
64
 
65
-Future request (RequestOptions options) async {
66
-  var resp = await instance.fetch(options);
65
+Future request(String path,
66
+    {data,
67
+    Map<String, dynamic>? queryParameters,
68
+    CancelToken? cancelToken,
69
+    Options? options,
70
+    ProgressCallback? onSendProgress,
71
+    ProgressCallback? onReceiveProgress}) async {
72
+
73
+  var resp = await instance.request(path,
74
+      data: data,
75
+      queryParameters: queryParameters,
76
+      cancelToken: cancelToken,
77
+      options: options);
67
 
78
 
68
   if (resp.data.runtimeType == String) {
79
   if (resp.data.runtimeType == String) {
69
     String dt = resp.data as String;
80
     String dt = resp.data as String;

+ 54
- 0
lib/widgets/Cell.dart 查看文件

1
+
2
+import 'package:flutter/cupertino.dart';
3
+import 'package:flutter/widgets.dart';
4
+import 'package:flutter_screenutil/flutter_screenutil.dart';
5
+
6
+class Cell extends StatelessWidget {
7
+  const Cell ({
8
+    Key? key,
9
+    this.header,
10
+    required this.child,
11
+    this.footer,
12
+    this.margin,
13
+  }) : super(key: key);
14
+
15
+  final Widget? header;
16
+  final Widget child;
17
+  final Widget? footer;
18
+  final EdgeInsetsGeometry? margin;
19
+
20
+  @override
21
+  Widget build(BuildContext context) {
22
+
23
+    return Container(
24
+      margin: margin,
25
+      padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 0.0),
26
+      decoration: const BoxDecoration(
27
+        border: Border(
28
+          bottom: BorderSide(width: 1.0, color: Color(0x1F000000)),
29
+        )
30
+      ),
31
+      child: Row(
32
+        children: [
33
+          if (null != header) SizedBox(
34
+            width: 53.w,
35
+            child: Container(
36
+              decoration: const BoxDecoration(
37
+                border: Border(
38
+                  right: BorderSide(width: 1, color: Color(0xFF333333))
39
+                )
40
+              ),
41
+              child: header,
42
+            ),
43
+          ),
44
+          Expanded(child: child,),
45
+          if (null != footer) ConstrainedBox (
46
+            constraints: BoxConstraints(maxWidth: 94.w),
47
+            child: footer,
48
+          )
49
+        ],
50
+      ),
51
+    );
52
+  }
53
+  
54
+}

+ 88
- 0
lib/widgets/GradientButton.dart 查看文件

1
+
2
+
3
+import 'package:flutter/material.dart';
4
+import 'package:flutter/widgets.dart';
5
+
6
+class GradientButton extends StatelessWidget {
7
+  const GradientButton({
8
+    Key? key,
9
+    this.colors,
10
+    this.linearStart,
11
+    this.linearEnd,
12
+    required this.onPressed,
13
+    required this.child,
14
+    this.padding,
15
+    this.borderRadius = const BorderRadius.all(Radius.circular(2)),
16
+    this.textColor,
17
+    this.splashColor,
18
+    this.disabledColor,
19
+    this.disabledTextColor,
20
+    this.onHighlightChanged,
21
+  }) : super(key: key);
22
+
23
+  // 渐变色数组
24
+  final List<Color>? colors;
25
+  final Color? textColor;
26
+  final Color? splashColor;
27
+  final Color? disabledTextColor;
28
+  final Color? disabledColor;
29
+  final EdgeInsetsGeometry? padding;
30
+  final Alignment? linearStart;
31
+  final Alignment? linearEnd;
32
+
33
+  final Widget child;
34
+  final BorderRadius? borderRadius;
35
+
36
+  final GestureTapCallback? onPressed;
37
+  final ValueChanged<bool>? onHighlightChanged;
38
+
39
+  @override
40
+  Widget build(BuildContext context) {
41
+    ThemeData theme = Theme.of(context);
42
+    //确保colors数组不空
43
+    List<Color> _colors =
44
+        colors ?? [theme.primaryColor, theme.primaryColorDark];
45
+    final radius = borderRadius;
46
+    bool disabled = onPressed == null;
47
+
48
+    return DecoratedBox(
49
+      decoration: BoxDecoration(
50
+        gradient: disabled ? null : LinearGradient(begin: linearStart??Alignment.topCenter, end: linearEnd??Alignment.bottomCenter, colors: _colors),
51
+        color: disabled ? disabledColor ?? theme.disabledColor : null,
52
+        borderRadius: radius,
53
+      ),
54
+      child: Material(
55
+        type: MaterialType.transparency,
56
+        borderRadius: radius,
57
+        clipBehavior: Clip.hardEdge,
58
+        child: ConstrainedBox(
59
+          constraints: const BoxConstraints(minWidth: 88.0, minHeight: 36.0),
60
+          child: InkWell(
61
+            splashColor: splashColor ?? _colors.last,
62
+            highlightColor: Colors.transparent,
63
+            onHighlightChanged: onHighlightChanged,
64
+            onTap: onPressed,
65
+            child: Padding(
66
+              padding: padding ?? theme.buttonTheme.padding,
67
+              child: DefaultTextStyle(
68
+                style: const TextStyle(fontWeight: FontWeight.bold),
69
+                child: Center(
70
+                  child: DefaultTextStyle(
71
+                    style: theme.textTheme.button!.copyWith(
72
+                      color: disabled
73
+                          ? disabledTextColor ?? Colors.black38
74
+                          : textColor ?? Colors.white,
75
+                    ),
76
+                    child: child,
77
+                  ),
78
+                  widthFactor: 1,
79
+                  heightFactor: 1,
80
+                ),
81
+              ),
82
+            ),
83
+          ),
84
+        ),
85
+      ),
86
+    );
87
+  }
88
+}

+ 48
- 48
pubspec.lock 查看文件

5
     dependency: transitive
5
     dependency: transitive
6
     description:
6
     description:
7
       name: _fe_analyzer_shared
7
       name: _fe_analyzer_shared
8
-      url: "https://pub.dartlang.org"
8
+      url: "https://pub.flutter-io.cn"
9
     source: hosted
9
     source: hosted
10
     version: "38.0.0"
10
     version: "38.0.0"
11
   analyzer:
11
   analyzer:
12
     dependency: transitive
12
     dependency: transitive
13
     description:
13
     description:
14
       name: analyzer
14
       name: analyzer
15
-      url: "https://pub.dartlang.org"
15
+      url: "https://pub.flutter-io.cn"
16
     source: hosted
16
     source: hosted
17
     version: "3.4.1"
17
     version: "3.4.1"
18
   args:
18
   args:
19
     dependency: transitive
19
     dependency: transitive
20
     description:
20
     description:
21
       name: args
21
       name: args
22
-      url: "https://pub.dartlang.org"
22
+      url: "https://pub.flutter-io.cn"
23
     source: hosted
23
     source: hosted
24
     version: "2.3.0"
24
     version: "2.3.0"
25
   async:
25
   async:
26
     dependency: transitive
26
     dependency: transitive
27
     description:
27
     description:
28
       name: async
28
       name: async
29
-      url: "https://pub.dartlang.org"
29
+      url: "https://pub.flutter-io.cn"
30
     source: hosted
30
     source: hosted
31
     version: "2.8.2"
31
     version: "2.8.2"
32
   boolean_selector:
32
   boolean_selector:
33
     dependency: transitive
33
     dependency: transitive
34
     description:
34
     description:
35
       name: boolean_selector
35
       name: boolean_selector
36
-      url: "https://pub.dartlang.org"
36
+      url: "https://pub.flutter-io.cn"
37
     source: hosted
37
     source: hosted
38
     version: "2.1.0"
38
     version: "2.1.0"
39
   build:
39
   build:
40
     dependency: transitive
40
     dependency: transitive
41
     description:
41
     description:
42
       name: build
42
       name: build
43
-      url: "https://pub.dartlang.org"
43
+      url: "https://pub.flutter-io.cn"
44
     source: hosted
44
     source: hosted
45
     version: "2.2.1"
45
     version: "2.2.1"
46
   build_config:
46
   build_config:
47
     dependency: transitive
47
     dependency: transitive
48
     description:
48
     description:
49
       name: build_config
49
       name: build_config
50
-      url: "https://pub.dartlang.org"
50
+      url: "https://pub.flutter-io.cn"
51
     source: hosted
51
     source: hosted
52
     version: "1.0.0"
52
     version: "1.0.0"
53
   characters:
53
   characters:
54
     dependency: transitive
54
     dependency: transitive
55
     description:
55
     description:
56
       name: characters
56
       name: characters
57
-      url: "https://pub.dartlang.org"
57
+      url: "https://pub.flutter-io.cn"
58
     source: hosted
58
     source: hosted
59
     version: "1.2.0"
59
     version: "1.2.0"
60
   charcode:
60
   charcode:
61
     dependency: transitive
61
     dependency: transitive
62
     description:
62
     description:
63
       name: charcode
63
       name: charcode
64
-      url: "https://pub.dartlang.org"
64
+      url: "https://pub.flutter-io.cn"
65
     source: hosted
65
     source: hosted
66
     version: "1.3.1"
66
     version: "1.3.1"
67
   checked_yaml:
67
   checked_yaml:
68
     dependency: transitive
68
     dependency: transitive
69
     description:
69
     description:
70
       name: checked_yaml
70
       name: checked_yaml
71
-      url: "https://pub.dartlang.org"
71
+      url: "https://pub.flutter-io.cn"
72
     source: hosted
72
     source: hosted
73
     version: "2.0.1"
73
     version: "2.0.1"
74
   clock:
74
   clock:
75
     dependency: transitive
75
     dependency: transitive
76
     description:
76
     description:
77
       name: clock
77
       name: clock
78
-      url: "https://pub.dartlang.org"
78
+      url: "https://pub.flutter-io.cn"
79
     source: hosted
79
     source: hosted
80
     version: "1.1.0"
80
     version: "1.1.0"
81
   collection:
81
   collection:
82
     dependency: transitive
82
     dependency: transitive
83
     description:
83
     description:
84
       name: collection
84
       name: collection
85
-      url: "https://pub.dartlang.org"
85
+      url: "https://pub.flutter-io.cn"
86
     source: hosted
86
     source: hosted
87
     version: "1.15.0"
87
     version: "1.15.0"
88
   convert:
88
   convert:
89
     dependency: transitive
89
     dependency: transitive
90
     description:
90
     description:
91
       name: convert
91
       name: convert
92
-      url: "https://pub.dartlang.org"
92
+      url: "https://pub.flutter-io.cn"
93
     source: hosted
93
     source: hosted
94
     version: "3.0.1"
94
     version: "3.0.1"
95
   crypto:
95
   crypto:
96
     dependency: transitive
96
     dependency: transitive
97
     description:
97
     description:
98
       name: crypto
98
       name: crypto
99
-      url: "https://pub.dartlang.org"
99
+      url: "https://pub.flutter-io.cn"
100
     source: hosted
100
     source: hosted
101
     version: "3.0.1"
101
     version: "3.0.1"
102
   cupertino_icons:
102
   cupertino_icons:
103
     dependency: "direct main"
103
     dependency: "direct main"
104
     description:
104
     description:
105
       name: cupertino_icons
105
       name: cupertino_icons
106
-      url: "https://pub.dartlang.org"
106
+      url: "https://pub.flutter-io.cn"
107
     source: hosted
107
     source: hosted
108
     version: "1.0.4"
108
     version: "1.0.4"
109
   dart_style:
109
   dart_style:
110
     dependency: transitive
110
     dependency: transitive
111
     description:
111
     description:
112
       name: dart_style
112
       name: dart_style
113
-      url: "https://pub.dartlang.org"
113
+      url: "https://pub.flutter-io.cn"
114
     source: hosted
114
     source: hosted
115
     version: "2.2.2"
115
     version: "2.2.2"
116
   dio:
116
   dio:
117
     dependency: "direct main"
117
     dependency: "direct main"
118
     description:
118
     description:
119
       name: dio
119
       name: dio
120
-      url: "https://pub.dartlang.org"
120
+      url: "https://pub.flutter-io.cn"
121
     source: hosted
121
     source: hosted
122
     version: "4.0.6"
122
     version: "4.0.6"
123
   fake_async:
123
   fake_async:
124
     dependency: transitive
124
     dependency: transitive
125
     description:
125
     description:
126
       name: fake_async
126
       name: fake_async
127
-      url: "https://pub.dartlang.org"
127
+      url: "https://pub.flutter-io.cn"
128
     source: hosted
128
     source: hosted
129
     version: "1.2.0"
129
     version: "1.2.0"
130
   file:
130
   file:
131
     dependency: transitive
131
     dependency: transitive
132
     description:
132
     description:
133
       name: file
133
       name: file
134
-      url: "https://pub.dartlang.org"
134
+      url: "https://pub.flutter-io.cn"
135
     source: hosted
135
     source: hosted
136
     version: "6.1.2"
136
     version: "6.1.2"
137
   flutter:
137
   flutter:
143
     dependency: "direct dev"
143
     dependency: "direct dev"
144
     description:
144
     description:
145
       name: flutter_lints
145
       name: flutter_lints
146
-      url: "https://pub.dartlang.org"
146
+      url: "https://pub.flutter-io.cn"
147
     source: hosted
147
     source: hosted
148
     version: "1.0.4"
148
     version: "1.0.4"
149
   flutter_screenutil:
149
   flutter_screenutil:
150
-    dependency: "direct dev"
150
+    dependency: "direct main"
151
     description:
151
     description:
152
       name: flutter_screenutil
152
       name: flutter_screenutil
153
-      url: "https://pub.dartlang.org"
153
+      url: "https://pub.flutter-io.cn"
154
     source: hosted
154
     source: hosted
155
     version: "5.3.1"
155
     version: "5.3.1"
156
   flutter_test:
156
   flutter_test:
162
     dependency: "direct main"
162
     dependency: "direct main"
163
     description:
163
     description:
164
       name: get
164
       name: get
165
-      url: "https://pub.dartlang.org"
165
+      url: "https://pub.flutter-io.cn"
166
     source: hosted
166
     source: hosted
167
     version: "4.6.1"
167
     version: "4.6.1"
168
   glob:
168
   glob:
169
     dependency: transitive
169
     dependency: transitive
170
     description:
170
     description:
171
       name: glob
171
       name: glob
172
-      url: "https://pub.dartlang.org"
172
+      url: "https://pub.flutter-io.cn"
173
     source: hosted
173
     source: hosted
174
     version: "2.0.2"
174
     version: "2.0.2"
175
   http_parser:
175
   http_parser:
176
     dependency: transitive
176
     dependency: transitive
177
     description:
177
     description:
178
       name: http_parser
178
       name: http_parser
179
-      url: "https://pub.dartlang.org"
179
+      url: "https://pub.flutter-io.cn"
180
     source: hosted
180
     source: hosted
181
     version: "4.0.0"
181
     version: "4.0.0"
182
   json_annotation:
182
   json_annotation:
183
     dependency: transitive
183
     dependency: transitive
184
     description:
184
     description:
185
       name: json_annotation
185
       name: json_annotation
186
-      url: "https://pub.dartlang.org"
186
+      url: "https://pub.flutter-io.cn"
187
     source: hosted
187
     source: hosted
188
     version: "4.4.0"
188
     version: "4.4.0"
189
   json_serializable:
189
   json_serializable:
190
     dependency: "direct main"
190
     dependency: "direct main"
191
     description:
191
     description:
192
       name: json_serializable
192
       name: json_serializable
193
-      url: "https://pub.dartlang.org"
193
+      url: "https://pub.flutter-io.cn"
194
     source: hosted
194
     source: hosted
195
     version: "6.1.5"
195
     version: "6.1.5"
196
   lints:
196
   lints:
197
     dependency: transitive
197
     dependency: transitive
198
     description:
198
     description:
199
       name: lints
199
       name: lints
200
-      url: "https://pub.dartlang.org"
200
+      url: "https://pub.flutter-io.cn"
201
     source: hosted
201
     source: hosted
202
     version: "1.0.1"
202
     version: "1.0.1"
203
   logging:
203
   logging:
204
     dependency: transitive
204
     dependency: transitive
205
     description:
205
     description:
206
       name: logging
206
       name: logging
207
-      url: "https://pub.dartlang.org"
207
+      url: "https://pub.flutter-io.cn"
208
     source: hosted
208
     source: hosted
209
     version: "1.0.2"
209
     version: "1.0.2"
210
   matcher:
210
   matcher:
211
     dependency: transitive
211
     dependency: transitive
212
     description:
212
     description:
213
       name: matcher
213
       name: matcher
214
-      url: "https://pub.dartlang.org"
214
+      url: "https://pub.flutter-io.cn"
215
     source: hosted
215
     source: hosted
216
     version: "0.12.11"
216
     version: "0.12.11"
217
   material_color_utilities:
217
   material_color_utilities:
218
     dependency: transitive
218
     dependency: transitive
219
     description:
219
     description:
220
       name: material_color_utilities
220
       name: material_color_utilities
221
-      url: "https://pub.dartlang.org"
221
+      url: "https://pub.flutter-io.cn"
222
     source: hosted
222
     source: hosted
223
     version: "0.1.3"
223
     version: "0.1.3"
224
   meta:
224
   meta:
225
     dependency: transitive
225
     dependency: transitive
226
     description:
226
     description:
227
       name: meta
227
       name: meta
228
-      url: "https://pub.dartlang.org"
228
+      url: "https://pub.flutter-io.cn"
229
     source: hosted
229
     source: hosted
230
     version: "1.7.0"
230
     version: "1.7.0"
231
   package_config:
231
   package_config:
232
     dependency: transitive
232
     dependency: transitive
233
     description:
233
     description:
234
       name: package_config
234
       name: package_config
235
-      url: "https://pub.dartlang.org"
235
+      url: "https://pub.flutter-io.cn"
236
     source: hosted
236
     source: hosted
237
     version: "2.0.2"
237
     version: "2.0.2"
238
   path:
238
   path:
239
     dependency: transitive
239
     dependency: transitive
240
     description:
240
     description:
241
       name: path
241
       name: path
242
-      url: "https://pub.dartlang.org"
242
+      url: "https://pub.flutter-io.cn"
243
     source: hosted
243
     source: hosted
244
     version: "1.8.0"
244
     version: "1.8.0"
245
   pub_semver:
245
   pub_semver:
246
     dependency: transitive
246
     dependency: transitive
247
     description:
247
     description:
248
       name: pub_semver
248
       name: pub_semver
249
-      url: "https://pub.dartlang.org"
249
+      url: "https://pub.flutter-io.cn"
250
     source: hosted
250
     source: hosted
251
     version: "2.1.1"
251
     version: "2.1.1"
252
   pubspec_parse:
252
   pubspec_parse:
253
     dependency: transitive
253
     dependency: transitive
254
     description:
254
     description:
255
       name: pubspec_parse
255
       name: pubspec_parse
256
-      url: "https://pub.dartlang.org"
256
+      url: "https://pub.flutter-io.cn"
257
     source: hosted
257
     source: hosted
258
     version: "1.2.0"
258
     version: "1.2.0"
259
   sky_engine:
259
   sky_engine:
265
     dependency: transitive
265
     dependency: transitive
266
     description:
266
     description:
267
       name: source_gen
267
       name: source_gen
268
-      url: "https://pub.dartlang.org"
268
+      url: "https://pub.flutter-io.cn"
269
     source: hosted
269
     source: hosted
270
     version: "1.2.1"
270
     version: "1.2.1"
271
   source_helper:
271
   source_helper:
272
     dependency: transitive
272
     dependency: transitive
273
     description:
273
     description:
274
       name: source_helper
274
       name: source_helper
275
-      url: "https://pub.dartlang.org"
275
+      url: "https://pub.flutter-io.cn"
276
     source: hosted
276
     source: hosted
277
     version: "1.3.1"
277
     version: "1.3.1"
278
   source_span:
278
   source_span:
279
     dependency: transitive
279
     dependency: transitive
280
     description:
280
     description:
281
       name: source_span
281
       name: source_span
282
-      url: "https://pub.dartlang.org"
282
+      url: "https://pub.flutter-io.cn"
283
     source: hosted
283
     source: hosted
284
     version: "1.8.1"
284
     version: "1.8.1"
285
   stack_trace:
285
   stack_trace:
286
     dependency: transitive
286
     dependency: transitive
287
     description:
287
     description:
288
       name: stack_trace
288
       name: stack_trace
289
-      url: "https://pub.dartlang.org"
289
+      url: "https://pub.flutter-io.cn"
290
     source: hosted
290
     source: hosted
291
     version: "1.10.0"
291
     version: "1.10.0"
292
   stream_channel:
292
   stream_channel:
293
     dependency: transitive
293
     dependency: transitive
294
     description:
294
     description:
295
       name: stream_channel
295
       name: stream_channel
296
-      url: "https://pub.dartlang.org"
296
+      url: "https://pub.flutter-io.cn"
297
     source: hosted
297
     source: hosted
298
     version: "2.1.0"
298
     version: "2.1.0"
299
   string_scanner:
299
   string_scanner:
300
     dependency: transitive
300
     dependency: transitive
301
     description:
301
     description:
302
       name: string_scanner
302
       name: string_scanner
303
-      url: "https://pub.dartlang.org"
303
+      url: "https://pub.flutter-io.cn"
304
     source: hosted
304
     source: hosted
305
     version: "1.1.0"
305
     version: "1.1.0"
306
   term_glyph:
306
   term_glyph:
307
     dependency: transitive
307
     dependency: transitive
308
     description:
308
     description:
309
       name: term_glyph
309
       name: term_glyph
310
-      url: "https://pub.dartlang.org"
310
+      url: "https://pub.flutter-io.cn"
311
     source: hosted
311
     source: hosted
312
     version: "1.2.0"
312
     version: "1.2.0"
313
   test_api:
313
   test_api:
314
     dependency: transitive
314
     dependency: transitive
315
     description:
315
     description:
316
       name: test_api
316
       name: test_api
317
-      url: "https://pub.dartlang.org"
317
+      url: "https://pub.flutter-io.cn"
318
     source: hosted
318
     source: hosted
319
     version: "0.4.8"
319
     version: "0.4.8"
320
   typed_data:
320
   typed_data:
321
     dependency: transitive
321
     dependency: transitive
322
     description:
322
     description:
323
       name: typed_data
323
       name: typed_data
324
-      url: "https://pub.dartlang.org"
324
+      url: "https://pub.flutter-io.cn"
325
     source: hosted
325
     source: hosted
326
     version: "1.3.0"
326
     version: "1.3.0"
327
   vector_math:
327
   vector_math:
328
     dependency: transitive
328
     dependency: transitive
329
     description:
329
     description:
330
       name: vector_math
330
       name: vector_math
331
-      url: "https://pub.dartlang.org"
331
+      url: "https://pub.flutter-io.cn"
332
     source: hosted
332
     source: hosted
333
     version: "2.1.1"
333
     version: "2.1.1"
334
   watcher:
334
   watcher:
335
     dependency: transitive
335
     dependency: transitive
336
     description:
336
     description:
337
       name: watcher
337
       name: watcher
338
-      url: "https://pub.dartlang.org"
338
+      url: "https://pub.flutter-io.cn"
339
     source: hosted
339
     source: hosted
340
     version: "1.0.1"
340
     version: "1.0.1"
341
   yaml:
341
   yaml:
342
     dependency: transitive
342
     dependency: transitive
343
     description:
343
     description:
344
       name: yaml
344
       name: yaml
345
-      url: "https://pub.dartlang.org"
345
+      url: "https://pub.flutter-io.cn"
346
     source: hosted
346
     source: hosted
347
     version: "3.1.0"
347
     version: "3.1.0"
348
 sdks:
348
 sdks:

+ 1
- 0
pubspec.yaml 查看文件

37
   json_serializable: ^6.1.5
37
   json_serializable: ^6.1.5
38
   get: ^4.6.1
38
   get: ^4.6.1
39
   dio: ^4.0.6
39
   dio: ^4.0.6
40
+  flutter_screenutil: ^5.3.1
40
 
41
 
41
 dev_dependencies:
42
 dev_dependencies:
42
   flutter_test:
43
   flutter_test: