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