my_plan_dish_home_page.dart
7.32 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
import 'package:flutter/material.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import '../../../utils/dialog_util.dart';
import '../../../utils/screen_util.dart';
/**
*
* 我的排菜首页
*/
class MyPlanDishHomePage extends StatefulWidget {
MyPlanDishHomePage({Key key}) : super(key: key);
@override
_MyPlanDishHomePageState createState() => _MyPlanDishHomePageState();
}
class _MyPlanDishHomePageState extends State<MyPlanDishHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: SystemAppBar('我的排菜'),
backgroundColor: MyColours.color_ffffff,
body: Column(
children: [
MyDivider(
double.infinity,
w(1),
color: MyColours.color_DBDBDB,
),
Expanded(
child: ListView.builder(
itemCount: 10,
itemBuilder: (context, index) {
return Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: MyColours.color_DBDBDB, width: w(1)))),
child: Padding(
padding: EdgeInsets.only(
left: w(20), right: w(20), top: w(15), bottom: w(3)),
child: Column(
children: [
Row(
children: [
Expanded(
child: Text(
'8人聚会餐',
maxLines: 3,
style: TextStyle(
fontSize: font(16),
color: MyColours.color_515151),
overflow: TextOverflow.ellipsis,
)),
HEmptyView(22),
Text('1200元/8人',
style: TextStyle(
fontSize: font(14),
color: MyColours.color_515151)),
HEmptyView(22),
InkWell(
onTap: () {
//弹框确认是否删除
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "是否确定删除该排菜?",
rTitle: "确定删除", rCallback: () {
// Navigator.pop(context);
// _delGuestInfocDay(model.cday[index].id);
});
},
child: Padding(
padding: EdgeInsets.only(left: w(11)),
child: Image.asset(
Utils.getImgPath('f_delete_red'),
width: w(17),
)))
],
),
VEmptyView(22),
Text(
'铁锅炖大鹅,白山叫花鸡,主席红烧肉,清蒸鲈鱼,荷塘小炒,松仁玉米,咸蛋黄焗南瓜,黑椒牛柳,夫妻肺片,蒜泥茄子,卤水拼盘,东北大拉皮,西湖牛肉羹,扬州炒饭,咸蛋黄焗南瓜,黑椒牛柳,夫妻肺片,蒜泥茄子,卤水拼盘,东北大拉皮,西湖牛肉羹,扬州炒饭',
maxLines: 3,
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151),
overflow: TextOverflow.ellipsis,
),
VEmptyView(8),
Row(
children: [
Container(
height: w(24),
padding: EdgeInsets.only(top: w(6)),
child: Text('更新时间:2022-11-08',
style: TextStyle(
fontSize: font(12),
color: MyColours.color_515151)),
),
Spacer(),
RoundButton(
text: '复用',
width: w(80),
height: w(30),
fontSize: 24,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
textColor: MyColours.color_438E93,
radius: r(5),
isBold: false,
onPressed: () {
NavigatorUtil.goFinalPlanDishPage(context);
},
),
HEmptyView(20),
RoundButton(
text: '修改',
width: w(80),
height: w(30),
fontSize: 24,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
textColor: MyColours.color_438E93,
radius: r(5),
isBold: false,
onPressed: () {
NavigatorUtil.goFinalPlanDishPage(context);
},
)
],
)
],
),
),
);
}),
),
Padding(
padding: EdgeInsets.only(
top: w(12), bottom: w(25), left: w(45), right: w(45)),
child: RoundButton(
text: '创建新排菜',
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
width: double.infinity,
height: w(43),
radius: r(5),
fontSize: 36,
isBold: false,
onPressed: () {
NavigatorUtil.goPlanNewDishFirstPage(context);
},
),
)
],
),
);
}
}