|
|
|
import 'dart:convert';
|
|
|
|
import 'dart:ui';
|
|
|
|
|
|
|
|
import 'package:common_utils/common_utils.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
...
|
...
|
@@ -6,8 +7,10 @@ import 'package:flutter_picker/flutter_picker.dart'; |
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/constant/constant.dart';
|
|
|
|
import 'package:one_key/models/remark.dart';
|
|
|
|
import 'package:one_key/pages/home_enter_order/home_enter_order.dart';
|
|
|
|
import 'package:one_key/pages/message/message_dialog_item.dart';
|
|
|
|
import 'package:one_key/provider/message_dialog_model.dart';
|
|
|
|
import 'package:one_key/provider/table_manager_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
|
|
import 'package:one_key/utils/misc.dart';
|
|
|
|
import 'package:one_key/route/navigator_util.dart';
|
|
...
|
...
|
@@ -36,112 +39,128 @@ class DialogUtil { |
|
|
|
return Center(
|
|
|
|
child: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(72)),
|
|
|
|
height: ScreenUtil().setWidth(380),
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(50)),
|
|
|
|
height: ScreenUtil().setWidth(207 * 2),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(30))),
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角
|
|
|
|
child: Column(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(10)))), //设置圆角
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
VEmptyView(40),
|
|
|
|
Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建区域',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(36),
|
|
|
|
color: MyColours.color_199095)),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
padding: EdgeInsets.all(ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
'区域名称',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
Container(
|
|
|
|
// height: ScreenUtil().setWidth(48),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('新建区域',
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontSize: ScreenUtil().setSp(34),
|
|
|
|
color: MyColours.color_333333)),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
),
|
|
|
|
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
top: 15, bottom: -15), //设置文字内容与边框距离
|
|
|
|
enabledBorder: UnderlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide(color: MyColours.color_d8d8d8),
|
|
|
|
),
|
|
|
|
focusedBorder: UnderlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide(color: MyColours.color_d8d8d8),
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
hintText: '点击输入区域名称',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
Text(
|
|
|
|
'区域名称',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(32),
|
|
|
|
color: MyColours.color_333333),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
HEmptyView(40),
|
|
|
|
Expanded(
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
// //光标颜色
|
|
|
|
// 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,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
onTap(controller.text);
|
|
|
|
Navigator.pop(context, controller.text);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VEmptyView(60),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '取消',
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
height: ScreenUtil().setWidth(84),
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
textColor: MyColours.color_199095,
|
|
|
|
borderColor: MyColours.color_199095,
|
|
|
|
isBold: false,
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
onPressed: () {
|
|
|
|
Positioned(
|
|
|
|
top: 0,
|
|
|
|
right: 0,
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
RoundButton(
|
|
|
|
text: '保存',
|
|
|
|
width: ScreenUtil().setWidth(120),
|
|
|
|
height: ScreenUtil().setWidth(84),
|
|
|
|
isBold: false,
|
|
|
|
radius: ScreenUtil().setWidth(20),
|
|
|
|
onPressed: () {
|
|
|
|
if (controller.text.trim() == '') {
|
|
|
|
Utils.showToast('请输入区域名称!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
onTap(controller.text);
|
|
|
|
Navigator.pop(context, controller.text);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
...
|
...
|
@@ -152,6 +171,417 @@ class DialogUtil { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
static btnChoose(String title, double width, ClickCallback callback) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
callback(title);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(20),
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
height: ScreenUtil().setWidth(60),
|
|
|
|
width: width,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
width: ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_199095),
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: Text(
|
|
|
|
title,
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setWidth(28)),
|
|
|
|
)),
|
|
|
|
HEmptyView(10),
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('enter_order_arrow'),
|
|
|
|
width: ScreenUtil().setWidth(20),
|
|
|
|
height: ScreenUtil().setWidth(10),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
|
|
|
|
static selectWidget(List<String> data, CustomCallBack onTap) {
|
|
|
|
return 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),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxHeight: ScreenUtil().setWidth(140 * 2),
|
|
|
|
),
|
|
|
|
child: ListView.builder(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
itemCount: data.length,
|
|
|
|
itemBuilder: (context, index) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () {
|
|
|
|
onTap(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(data[index],
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setSp(28))),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}));
|
|
|
|
}
|
|
|
|
|
|
|
|
static Future openCreateTableDialog(BuildContext context, List<String> areas,
|
|
|
|
int currentAreaIndex, List<String> pnum,
|
|
|
|
{CustomCallBack onTap}) async {
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
FocusNode focusNode = FocusNode();
|
|
|
|
bool showArea = true;
|
|
|
|
bool showPnumMin = true;
|
|
|
|
bool showPnumMax = true;
|
|
|
|
String pnumMin = '';
|
|
|
|
String pnumMax = '';
|
|
|
|
StateSetter globalState;
|
|
|
|
// //输入框焦点
|
|
|
|
// focusNode.addListener(() {
|
|
|
|
// if (!focusNode.hasFocus) {
|
|
|
|
// // print('失去焦点');
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
// // print('得到焦点');
|
|
|
|
// globalState(() {
|
|
|
|
// showPnumMin = true;
|
|
|
|
// showPnumMax = true;
|
|
|
|
// showArea = true;
|
|
|
|
// });
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
|
|
|
|
final action = await showDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: false,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
return StatefulBuilder(builder: (context, 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,
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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);
|
|
|
|
})
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
)),
|
|
|
|
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),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//跳转拨打电话页面
|
|
|
|
static goPhone(String phoneNum) async {
|
|
|
|
String url = "tel:$phoneNum";
|
...
|
...
|
|