feast_board.item.dart
3.52 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
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../widgets/round_button.dart';
class FeastBoardItem extends StatefulWidget {
FeastBoardItem({Key key}) : super(key: key);
@override
_FeastBoardItemState createState() => _FeastBoardItemState();
}
class _FeastBoardItemState extends State<FeastBoardItem> {
Widget numWidget(String title, bool select, {bool needMargin = true}) {
return Container(
width: ScreenUtil().setWidth(32),
height: ScreenUtil().setWidth(32),
alignment: Alignment.center,
margin: needMargin
? EdgeInsets.only(right: ScreenUtil().setWidth(50))
: EdgeInsets.zero,
decoration: BoxDecoration(
color: select ? MyColours.color_438E93 : MyColours.color_BFC4D4,
borderRadius: BorderRadius.circular(ScreenUtil().radius(4))),
child: Text(
title,
style: TextStyle(
color: select ? MyColours.color_ffffff : MyColours.color_515151,
fontSize: ScreenUtil().setSp(16)),
),
);
}
Widget canduanWidget(String title) {
return Column(
children: [
VEmptyView(16),
Row(
children: [
Text(
title,
style: TextStyle(
fontSize: ScreenUtil().setSp(28),
color: MyColours.color_000000,
fontWeight: FontWeight.bold),
),
HEmptyView(56),
RoundButton(
onPressed: () async {},
text: '刘经理 30桌',
fontSize: 20,
isBold: false,
height: ScreenUtil().setWidth(36),
width: ScreenUtil().setWidth(64 * 2),
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
radius: ScreenUtil().radius(10),
textColor: MyColours.color_F6F6F6,
),
],
),
VEmptyView(16),
MyDivider(
double.infinity,
ScreenUtil().setWidth(2),
color: MyColours.color_DBDBDB,
)
],
);
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(bottom: ScreenUtil().setWidth(40)),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(24),
vertical: ScreenUtil().setWidth(16)),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(ScreenUtil().radius(10)),
border: Border.all(
color: MyColours.color_438E93, width: ScreenUtil().setWidth(2))),
child: Column(
children: [
Row(
children: [
Text(
'凤凰厅',
style: TextStyle(
color: MyColours.color_438E93,
fontSize: ScreenUtil().setSp(40),
fontWeight: FontWeight.bold),
),
Spacer(),
numWidget('空', false),
numWidget('1', true),
numWidget('空', false),
numWidget('空', false, needMargin: false),
],
),
VEmptyView(24),
canduanWidget('早餐'),
canduanWidget('午餐'),
canduanWidget('晚餐'),
canduanWidget('其他'),
],
),
);
}
}