feast_item.dart
5.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/widgets/v_empty_view.dart';
class FeastItem extends StatefulWidget {
FeastItem({Key key}) : super(key: key);
@override
_FeastItemState createState() => _FeastItemState();
}
class _FeastItemState extends State<FeastItem> {
List<Widget> taocanWidget(List data) {
List<Widget> list = [];
data.forEach((element) {
list.add(
RichText(
textScaleFactor: 1,
overflow: TextOverflow.ellipsis,
// textDirection: TextDirection.ltr,
// textAlign: TextAlign.left,
text: TextSpan(
children: [
TextSpan(
text: "1299套餐:",
style: TextStyle(
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
recognizer: TapGestureRecognizer()..onTap = () {}),
TextSpan(
text: "已调菜",
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(28)),
//点击事件
recognizer: TapGestureRecognizer()
..onTap = () {
print("点击了安全协议");
}),
TextSpan(
text: "保证30桌、备2桌",
style: TextStyle(
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
recognizer: TapGestureRecognizer()..onTap = () {}),
],
)),
);
});
return list;
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(36)),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_f3f3f3, width: ScreenUtil().setWidth(2)),
boxShadow: [
BoxShadow(
color: MyColours.color_1F000000,
offset: Offset(0, ScreenUtil().setWidth(8)),
blurRadius: ScreenUtil().setWidth(8))
],
borderRadius: BorderRadius.circular(ScreenUtil().radius(10))),
child: Column(
children: [
Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(16),
vertical: ScreenUtil().setWidth(8)),
decoration: BoxDecoration(
color: MyColours.color_438E93,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(ScreenUtil().radius(10)),
topRight: Radius.circular(ScreenUtil().radius(10)),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'8月1日 午餐 14:00-16:00',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_F6F6F6,
fontSize: ScreenUtil().setSp(40)),
),
Text(
'婚宴',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_F6F6F6,
fontSize: ScreenUtil().setSp(40)),
)
],
)),
Container(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(16),
vertical: ScreenUtil().setWidth(14)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(ScreenUtil().radius(10)),
bottomRight: Radius.circular(ScreenUtil().radius(10)),
),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'桌位:凤凰厅、包间1、包间2',
style: TextStyle(
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
),
VEmptyView(8),
Column(
children: taocanWidget(['ff', 'ff', 'ff', 'ff']),
),
VEmptyView(36),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'方先生 订32桌 备2桌',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
),
Text(
'负责人:刘经理',
style: TextStyle(
fontWeight: FontWeight.bold,
color: MyColours.color_000000,
fontSize: ScreenUtil().setSp(28)),
),
],
)
],
),
)
],
),
);
}
}