1
1
import 'package:flutter/material.dart' ;
2
- class FindView extends StatefulWidget {
2
+ import 'dart:ui' ;
3
+ import 'scanVC.dart' ;
4
+
5
+ class FindView extends StatefulWidget {
3
6
@override
4
7
_FindViewState createState () => new _FindViewState ();
5
8
}
6
- class _FindViewState extends State {
9
+
10
+ class _FindViewState extends State {
7
11
@override
8
- Container _FindCell (String iconName,String contentName,Color color,double topY) {
12
+ Container _FindCell (String iconName, String contentName, Color color,
13
+ double topY, double lineH) {
9
14
return new Container (
10
- padding: EdgeInsets .only (top: topY),
11
- child: new Container (
12
- height: 56.0 ,
13
- child: new ListTile (
14
- leading: new Image .asset (
15
- iconName,
16
- height: 40 ,
17
- width: 40 ,
18
- // color: color,
15
+ padding: EdgeInsets .only (top: topY),
16
+ color: Color .fromARGB (0xff , 0xf2 , 0xf2 , 0xf2 ),
17
+ // height: 54.0 + topY + lineH ,
18
+ child: new Column (
19
+ children: < Widget > [
20
+ Container (
21
+ height: 54.0 + lineH,
22
+ color: Colors .white,
23
+ child: new Row (
24
+ // mainAxisAlignment: MainAxisAlignment.start,
25
+ children: < Widget > [
26
+ Container (width: 17 ),
27
+ new Image .asset (
28
+ iconName,
29
+ height: 22.0 ,
30
+ width: 22 ,
31
+ // color: color,
32
+ ),
33
+ Container (width: 17 ),
34
+ new Text (
35
+ contentName,
36
+ style: const TextStyle (
37
+ fontSize: 17.0 ,
38
+ fontWeight: FontWeight .w400,
39
+ ),
40
+ )
41
+ ]),
42
+ ),
43
+ Container (
44
+ height: lineH,
45
+ child: new Row (
46
+ children: < Widget > [
47
+ Container (
48
+ width: 60 ,
49
+ color: Colors .white,
50
+ ),
51
+ Container (
52
+ color: Color .fromARGB (0x7d , 0xd9 , 0xd9 , 0xd9 ),
53
+ width: window.physicalSize.width / 3 - 60 ,
54
+ )
55
+ ],
19
56
),
20
- title: new Text (contentName),
21
- ),
22
- color: Colors .white,
23
- ),
24
- color: Colors .grey[200 ],
57
+ // padding: EdgeInsets.all(100),
58
+ ),
59
+ ],
60
+ ),
25
61
);
26
62
}
27
63
28
64
Widget build (BuildContext context) {
29
65
// TODO: implement build
30
66
return new Scaffold (
31
- backgroundColor: Colors .green ,
32
- body: new ListView (
67
+ backgroundColor: Color . fromARGB ( 0xff , 0xf2 , 0xf2 , 0xf2 ) ,
68
+ body: new ListView (
33
69
children: < Widget > [
34
- _FindCell ( "wechatassts/ff_IconShowAlbum@3x.png" , "朋友圈" , Colors .red, 0.0 ),
35
-
36
- _FindCell ( "wechatassts/ff_IconQRCode@3x.png" , "扫一扫" , Colors .red, 20.0 ),
37
- _FindCell ( "wechatassts/ff_IconShake@3x.png" , "摇一摇" , Colors .red, 0 ) ,
38
-
39
- _FindCell ( "wechatassts/ff_IconBrowse1@3x.png" , "看一看" , Colors .red,20. 0 ),
40
- _FindCell ( "wechatassts/ff_IconSearch1@3x.png" , "搜一搜" , Colors .red, 0 ),
70
+ new GestureDetector (
71
+ onTap : () {
72
+ print ( "点朋友圈Cell" );
73
+ } ,
74
+ child : _FindCell ( "wechatassts/ff_IconShowAlbum@3x.png" , "朋友圈" ,
75
+ Colors .red, 0.0 , 0 ),
76
+ ),
41
77
42
- _FindCell ("wechatassts/ff_IconNearby@3x.png" , "附近的人" , Colors .red,20 ),
43
- _FindCell ("wechatassts/ff_IconBottle@3x.png" , "漂流瓶" , Colors .red,0 ),
44
- _FindCell ("wechatassts/ff_IconQRCode@3x.png" , "附近的餐厅" , Colors .red,0 ),
78
+ new GestureDetector (
79
+ onTap: () {
80
+ print ("点了扫一扫" );
81
+ },
82
+ child: _FindCell ("wechatassts/ff_IconQRCode@3x.png" , "扫一扫" ,
83
+ Colors .red, 9.0 , 0.5 ),
84
+ ),
45
85
46
- _FindCell ("wechatassts/ff_IconQRCode@3x.png" , "购物" , Colors .red,20.0 ),
47
- _FindCell ("wechatassts/GameCenterH5GameMenuBtn@2x.png" , "游戏" , Colors .red,0 ),
86
+ _FindCell (
87
+ "wechatassts/ff_IconShake@3x.png" , "摇一摇" , Colors .red, 0 , 0 ),
88
+ _FindCell ("wechatassts/ff_IconBrowse1@3x.png" , "看一看" , Colors .red,
89
+ 9.0 , 0.5 ),
90
+ _FindCell (
91
+ "wechatassts/ff_IconSearch1@3x.png" , "搜一搜" , Colors .red, 0 , 0 ),
92
+ _FindCell (
93
+ "wechatassts/ff_IconNearby@3x.png" , "附近的人" , Colors .red, 9 , 0.5 ),
94
+ _FindCell (
95
+ "wechatassts/ff_IconBottle@3x.png" , "漂流瓶" , Colors .red, 0 , 0.5 ),
96
+ _FindCell (
97
+ "wechatassts/ff_IconQRCode@3x.png" , "附近的餐厅" , Colors .red, 0 , 0 ),
98
+ _FindCell (
99
+ "wechatassts/ff_IconQRCode@3x.png" , "购物" , Colors .red, 9 , 0.5 ),
100
+ _FindCell ("wechatassts/GameCenterH5GameMenuBtn@2x.png" , "游戏" ,
101
+ Colors .red, 0 , 0 ),
102
+ _FindCell ("wechatassts/PaidDetail_MiniProgram@3x.png" , "小程序" ,
103
+ Colors .red, 9 , 0 ),
48
104
49
- _FindCell ("wechatassts/PaidDetail_MiniProgram@3x.png" , "小程序" , Colors .red,20.0 ),
105
+ // _FindCell("wechatassts/ff_IconShowAlbum@3x.png", "朋友圈", Colors.red,
106
+ // 0.0, 0),
107
+ // _FindCell("wechatassts/ff_IconQRCode@3x.png", "扫一扫", Colors.red,
108
+ // 9.0, 0.5),
50
109
51
- /*
52
- new Container(
110
+ /*
111
+
53
112
padding:const EdgeInsets.only(top: 20.0),
54
113
child: new Container(
55
114
height: 50.0,
@@ -122,8 +181,7 @@ class _FindViewState extends State{
122
181
color: Colors.grey[200],
123
182
),
124
183
*/
125
- ],
126
- )
127
- );
184
+ ],
185
+ ));
128
186
}
129
- }
187
+ }
0 commit comments