|
...
|
...
|
@@ -27,6 +27,7 @@ import 'package:one_key/models/table.dart' as t; |
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
typedef CustomCallBack = void Function(Object object);
|
|
|
|
typedef CustomCallBackMap = void Function(Map<String, String> object);
|
|
|
|
|
|
|
|
class DialogUtil {
|
|
|
|
static Future openCreateAreaDialog(BuildContext context,
|
|
...
|
...
|
@@ -245,7 +246,7 @@ class DialogUtil { |
|
|
|
|
|
|
|
static Future openCreateTableDialog(BuildContext context, List<String> areas,
|
|
|
|
int currentAreaIndex, List<String> pnum,
|
|
|
|
{CustomCallBack onTap}) async {
|
|
|
|
{CustomCallBackMap onTap}) async {
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
FocusNode focusNode = FocusNode();
|
|
|
|
bool showArea = true;
|
|
...
|
...
|
@@ -253,7 +254,7 @@ class DialogUtil { |
|
|
|
bool showPnumMax = true;
|
|
|
|
String pnumMin = '';
|
|
|
|
String pnumMax = '';
|
|
|
|
StateSetter globalState;
|
|
|
|
// StateSetter globalState;
|
|
|
|
// //输入框焦点
|
|
|
|
// focusNode.addListener(() {
|
|
|
|
// if (!focusNode.hasFocus) {
|
|
...
|
...
|
@@ -274,310 +275,314 @@ class DialogUtil { |
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return StatefulBuilder(builder: (context, state) {
|
|
|
|
globalState = state;
|
|
|
|
// globalState = state;
|
|
|
|
return Center(
|
|
|
|
child: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: ScreenUtil().setWidth(326 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Stack(
|
|
|
|
overflow: Overflow.visible,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_333333)),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'*',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_E95750),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'选择区域',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChoose(areas[currentAreaIndex],
|
|
|
|
ScreenUtil().setWidth(120 * 2), (value) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showArea = !showArea;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(28 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: ScreenUtil().setWidth(326 * 2) +
|
|
|
|
ScreenUtil().setWidth(45 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Stack(children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Stack(
|
|
|
|
overflow: Overflow.visible,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'*',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_E95750),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'桌位名称',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
focusNode: focusNode,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil()
|
|
|
|
.setWidth(40)), //设置文字内容与边框距离
|
|
|
|
enabledBorder: UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_efefef),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.all(
|
|
|
|
ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建桌位',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(34),
|
|
|
|
color:
|
|
|
|
MyColours.color_333333)),
|
|
|
|
),
|
|
|
|
focusedBorder: UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours.color_efefef,
|
|
|
|
width: ScreenUtil().setWidth(2)),
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'*',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_E95750),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'选择区域',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChoose(
|
|
|
|
areas[currentAreaIndex],
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(120 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showArea = !showArea;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
hintText: '请输入桌位名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(28 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'*',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_E95750),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'桌位名称',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
focusNode: focusNode,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
color: MyColours
|
|
|
|
.color_333333),
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil()
|
|
|
|
.setWidth(
|
|
|
|
40)), //设置文字内容与边框距离
|
|
|
|
enabledBorder:
|
|
|
|
UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours
|
|
|
|
.color_efefef),
|
|
|
|
),
|
|
|
|
focusedBorder:
|
|
|
|
UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide(
|
|
|
|
color: MyColours
|
|
|
|
.color_efefef,
|
|
|
|
width: ScreenUtil()
|
|
|
|
.setWidth(2)),
|
|
|
|
),
|
|
|
|
hintText: '请输入桌位名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_999999,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.text,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context).requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment:
|
|
|
|
CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'人数(选填)',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(32),
|
|
|
|
color:
|
|
|
|
MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChoose(pnumMin,
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'至',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30),
|
|
|
|
color:
|
|
|
|
MyColours.color_199095),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
btnChoose(pnumMax,
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(80),
|
|
|
|
RoundButton(
|
|
|
|
text: '保存',
|
|
|
|
width: ScreenUtil().setWidth(300),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() ==
|
|
|
|
'') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap({
|
|
|
|
'areaname':
|
|
|
|
areas[currentAreaIndex],
|
|
|
|
'name': controller.text,
|
|
|
|
'pnumMin': pnumMin,
|
|
|
|
'pnumMax': pnumMax
|
|
|
|
});
|
|
|
|
Navigator.pop(context);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(30 * 2),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'*',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_E95750),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'人数(选填)',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChoose(
|
|
|
|
pnumMin, ScreenUtil().setWidth(52 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'至',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
btnChoose(
|
|
|
|
pnumMax, ScreenUtil().setWidth(52 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(113 * 2),
|
|
|
|
top: ScreenUtil().setWidth(105 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showArea,
|
|
|
|
child: selectWidget(areas, (index) {
|
|
|
|
state(() {
|
|
|
|
showArea = !showArea;
|
|
|
|
currentAreaIndex = index;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(30),
|
|
|
|
right: ScreenUtil().setWidth(40),
|
|
|
|
left: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(40),
|
|
|
|
),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('close'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(80),
|
|
|
|
RoundButton(
|
|
|
|
text: '保存',
|
|
|
|
width: ScreenUtil().setWidth(300),
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
fontSize: 34,
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() == '') {
|
|
|
|
Utils.showToast('请输入桌位名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// 当前选中区域
|
|
|
|
// areas[currentAreaIndex]
|
|
|
|
//最低人数
|
|
|
|
// pnumMin
|
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
onTap(controller.text);
|
|
|
|
Navigator.pop(context, controller.text);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(45 * 2),
|
|
|
|
color: Colors.transparent)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(113 * 2),
|
|
|
|
top: ScreenUtil().setWidth(105 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showArea,
|
|
|
|
child: selectWidget(areas, (index) {
|
|
|
|
state(() {
|
|
|
|
showArea = !showArea;
|
|
|
|
currentAreaIndex = index;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
// child: Container(
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// color: MyColours.color_ffffff,
|
|
|
|
// borderRadius: BorderRadius.circular(
|
|
|
|
// ScreenUtil().setWidth(10)),
|
|
|
|
// border: Border.all(
|
|
|
|
// color: MyColours.color_cccccc,
|
|
|
|
// width: ScreenUtil().setWidth(2))),
|
|
|
|
// width: ScreenUtil().setWidth(120 * 2),
|
|
|
|
// height: ScreenUtil().setWidth(140 * 2),
|
|
|
|
// child: ListView.builder(
|
|
|
|
// padding: EdgeInsets.symmetric(
|
|
|
|
// horizontal:
|
|
|
|
// ScreenUtil().setWidth(20)),
|
|
|
|
// itemCount: areas.length,
|
|
|
|
// itemBuilder: (context, index) {
|
|
|
|
// return InkWell(
|
|
|
|
// onTap: () {
|
|
|
|
// state(() {
|
|
|
|
// showArea = !showArea;
|
|
|
|
// currentAreaIndex = index;
|
|
|
|
// });
|
|
|
|
// },
|
|
|
|
// child: Container(
|
|
|
|
// padding: EdgeInsets.all(
|
|
|
|
// ScreenUtil().setWidth(20)),
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// border: Border(
|
|
|
|
// bottom: BorderSide(
|
|
|
|
// color: MyColours
|
|
|
|
// .color_efefef,
|
|
|
|
// width: ScreenUtil()
|
|
|
|
// .setWidth(2)))),
|
|
|
|
// child: Text(areas[index],
|
|
|
|
// style: TextStyle(
|
|
|
|
// color:
|
|
|
|
// MyColours.color_199095,
|
|
|
|
// fontSize: ScreenUtil()
|
|
|
|
// .setSp(28))),
|
|
|
|
// ),
|
|
|
|
// );
|
|
|
|
// }))
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(136 * 2),
|
|
|
|
top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(223 * 2),
|
|
|
|
top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(30),
|
|
|
|
right: ScreenUtil().setWidth(40),
|
|
|
|
left: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(40),
|
|
|
|
),
|
|
|
|
child: Image.asset(
|
|
|
|
Utils.getImgPath('close'),
|
|
|
|
width: ScreenUtil().setWidth(28),
|
|
|
|
height: ScreenUtil().setWidth(28),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
])));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
...
|
...
|
|