[baozhangchao] 3 år sedan
förälder
incheckning
3b58c0b6f6

Binär
images/icons/ListBack.png Visa fil


Binär
images/icons/decorate.png Visa fil


Binär
images/icons/deletes.png Visa fil


Binär
images/icons/edit.png Visa fil


Binär
images/icons/goback.png Visa fil


Binär
images/icons/goback_white.png Visa fil


Binär
images/icons/home.png Visa fil


Binär
images/icons/home_white.png Visa fil


Binär
images/icons/locationImage.png Visa fil


Binär
images/icons/scoreOFF.png Visa fil


Binär
images/icons/scoreON.png Visa fil


Binär
images/icons/starOff.png Visa fil


Binär
images/icons/starOn.png Visa fil


Binär
images/icons/timeImage.png Visa fil


+ 62
- 0
lib/pages/Information/ArticleInfo.dart Visa fil

@@ -0,0 +1,62 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+
4
+class ArticleInfo extends StatelessWidget {
5
+  const ArticleInfo({Key? key}) : super(key: key);
6
+
7
+  @override
8
+  Widget build(BuildContext context) {
9
+    return Scaffold(
10
+        resizeToAvoidBottomInset: false,
11
+        appBar: AppBar(
12
+          title: Text('资讯'),
13
+          leading: Icon(Icons.arrow_back_ios),
14
+          // backgroundColor: Colors.transparent,
15
+          centerTitle: true,
16
+        ),
17
+        body: Container(
18
+          padding: EdgeInsets.fromLTRB(15, 30, 15, 50),
19
+
20
+          child: Column(
21
+            children: [
22
+              Container(
23
+                alignment: Alignment.center,
24
+                child:  Row(
25
+                  mainAxisAlignment: MainAxisAlignment.center,
26
+                  children: [
27
+                    Image(image: AssetImage('images/icons/decorate.png'),width: 17,),
28
+                    Text('我是22222222222标题',
29
+                    style: TextStyle(
30
+                      fontSize: 17.sp,
31
+                      fontWeight: FontWeight.bold,
32
+
33
+                    ),
34
+                    ),
35
+                    Image(image: AssetImage('images/icons/decorate.png'),width: 17),
36
+
37
+                  ],
38
+                ),
39
+              ),
40
+              Container(
41
+                padding: EdgeInsets.fromLTRB(0, 20, 0, 10),
42
+                width: 344.w,
43
+                child: Text('gr一年之计在于春,连日来,农业生产工作正在热火朝天的进行着:农技人员走村串户指导农户春耕生产,大型拖拉机忙着翻垦农田,植保无人机 ',
44
+                style: TextStyle(
45
+                  fontSize: 14.sp
46
+                ),
47
+                ) ,
48
+              ),
49
+              Container(
50
+                padding: EdgeInsets.fromLTRB(0, 10, 0,10),
51
+                child: Image(image: AssetImage('images/cars.png'),width:320.w,height:260.w,fit: BoxFit.fill,),
52
+
53
+              )
54
+
55
+
56
+            ],
57
+          ),
58
+        ),
59
+    );
60
+
61
+  }
62
+}

+ 141
- 0
lib/pages/Information/index.dart Visa fil

@@ -0,0 +1,141 @@
1
+import 'package:flutter/material.dart';
2
+import 'package:flutter_screenutil/flutter_screenutil.dart';
3
+import 'package:get/get.dart';
4
+import 'package:get/get_core/src/get_main.dart';
5
+
6
+class Information extends StatefulWidget {
7
+  const Information({Key? key}) : super(key: key);
8
+
9
+  @override
10
+  State<Information> createState() => _InformationState();
11
+}
12
+
13
+class _InformationState extends State<Information> {
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: Colors.transparent,
22
+        centerTitle: true,
23
+      ),
24
+      body: ListView(
25
+        children: [
26
+          // ListTile用不好
27
+
28
+          GestureDetector(
29
+            child:
30
+            Container(
31
+                padding: EdgeInsets.fromLTRB(0, 30, 0, 30),
32
+                width: 310.w,
33
+                decoration: const BoxDecoration(
34
+                    border:Border(
35
+                        bottom:
36
+                        BorderSide(width: 0.5, color: Color(0x20000000)
37
+                          // 0x17000000
38
+                        ))
39
+                ),
40
+                child: Row(
41
+                  children: [
42
+                    Container(
43
+                      margin: EdgeInsets.fromLTRB(15, 0, 11, 0),
44
+                      width: 100,
45
+                      height: 100,
46
+                      decoration: BoxDecoration(
47
+                        image:  DecorationImage(
48
+                          image: AssetImage('images/cars.png'),
49
+                          fit: BoxFit.cover,
50
+                        ),
51
+
52
+                        borderRadius: BorderRadius.circular(12),
53
+                      ),
54
+                    )
55
+                    ,
56
+                    Column(
57
+                      crossAxisAlignment: CrossAxisAlignment.start,
58
+                      children: [
59
+                        Container(
60
+                          width: 240.w,
61
+                          padding: EdgeInsets.fromLTRB(0, 0, 0, 30),
62
+                          child: Text("我我就是一个标题,什阿三大苏打333萨达萨达萨达v么特不是",
63
+                              softWrap: true,
64
+                              maxLines: 2,
65
+                              textAlign: TextAlign.left,
66
+                              overflow: TextOverflow.ellipsis,
67
+                              style: TextStyle(
68
+                                fontSize: 17.sp, fontWeight: FontWeight.bold,)),
69
+                        ),
70
+                        Container(
71
+                          child: Text('2022-02-09'),
72
+                        )
73
+                      ],
74
+                    )
75
+                  ],
76
+                )
77
+            ),
78
+            onTap: () {
79
+              Get.toNamed('/ArticleInfo');
80
+            },
81
+          ),
82
+          GestureDetector(
83
+            child:
84
+            Container(
85
+                padding: EdgeInsets.fromLTRB(0, 30, 0, 30),
86
+                width: 310.w,
87
+                decoration: const BoxDecoration(
88
+                    border:Border(
89
+                        bottom:
90
+                        BorderSide(width: 0.5, color: Color(0x20000000)
91
+                          // 0x17000000
92
+                        ))
93
+                ),
94
+                child: Row(
95
+                  children: [
96
+                    Container(
97
+                      margin: EdgeInsets.fromLTRB(15, 0, 11, 0),
98
+                      width: 100,
99
+                      height: 100,
100
+                      decoration: BoxDecoration(
101
+                        image:  DecorationImage(
102
+                          image: AssetImage('images/cars.png'),
103
+                          fit: BoxFit.cover,
104
+                        ),
105
+
106
+                        borderRadius: BorderRadius.circular(12),
107
+                      ),
108
+                    )
109
+                    ,
110
+                    Column(
111
+                      crossAxisAlignment: CrossAxisAlignment.start,
112
+                      children: [
113
+                        Container(
114
+                          width: 240.w,
115
+                          padding: EdgeInsets.fromLTRB(0, 0, 0, 30),
116
+                          child: Text("我我就是一个标题,什阿三大苏打333萨达萨达萨达v么特不是",
117
+                              softWrap: true,
118
+                              maxLines: 2,
119
+                              textAlign: TextAlign.left,
120
+                              overflow: TextOverflow.ellipsis,
121
+                              style: TextStyle(
122
+                                fontSize: 17.sp, fontWeight: FontWeight.bold,)),
123
+                        ),
124
+                        Container(
125
+                          child: Text('2022-02-09'),
126
+                        )
127
+                      ],
128
+                    )
129
+                  ],
130
+                )
131
+            ),
132
+            onTap: () {
133
+              print('进入资讯详情');
134
+            },
135
+          )
136
+
137
+        ],
138
+      ),
139
+    );
140
+  }
141
+}

+ 2
- 0
lib/pages/main/widgets/UserInfo.dart Visa fil

@@ -7,6 +7,8 @@ class UserInfo extends StatelessWidget {
7 7
   @override
8 8
   Widget build(BuildContext context) {
9 9
     return Container(
10
+      margin: EdgeInsets.only(top: 20.0, bottom: 0.0),
11
+
10 12
       alignment: Alignment.center,
11 13
       height: 173.w,
12 14
       width: 345.w,

+ 7
- 3
lib/routes/pages.dart Visa fil

@@ -1,12 +1,16 @@
1 1
 
2 2
 import 'package:get/get.dart';
3
+import '../pages/Information/ArticleInfo.dart';
4
+import '../pages/Information/index.dart';//资讯页面
3 5
 import '../pages/index.dart';//Home
4
-import '../pages/main/index.dart';
5
-import '../pages/order/index.dart';
6
+import '../pages/main/index.dart';//我的
7
+import '../pages/order/index.dart';//订单
6 8
 import '../widgets/OrderInfoCard.dart';
7 9
 
8 10
 List<GetPage> pages = [
9
-  GetPage(name: '/', page: () =>  MainPage()),
11
+  GetPage(name: '/', page: () =>  ArticleInfo()),
12
+  GetPage(name: '/ArticleInfo', page: () =>  ArticleInfo()),//资讯详情
13
+
10 14
   // GetPage(name: '/splash', page: () => SplashScreen()),
11 15
   // GetPage(name: '/login', page: () =>  MyRouteLogin()),
12 16
 ];

+ 1
- 0
pubspec.yaml Visa fil

@@ -86,6 +86,7 @@ flutter:
86 86
     - images/feedbacks.png
87 87
     - images/userRight.png
88 88
     - images/versionUpdate.png
89
+    - images/icons/decorate.png
89 90
 
90 91
   # An image asset can refer to one or more resolution-specific "variants", see
91 92
   # https://flutter.dev/assets-and-images/#resolution-aware.