|
...
|
...
|
@@ -4918,6 +4918,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMin,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -4933,6 +4934,7 @@ class DialogUtil { |
|
|
|
.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
counterText: "",
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding: EdgeInsets
|
|
|
|
.zero, //设置文字内容与边框距离
|
|
...
|
...
|
@@ -5003,6 +5005,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMax,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -5021,6 +5024,7 @@ class DialogUtil { |
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding: EdgeInsets
|
|
|
|
.zero, //设置文字内容与边框距离
|
|
|
|
counterText: "", // 隐藏默认的字符计数器
|
|
|
|
|
|
|
|
// enabledBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
...
|
...
|
@@ -5523,6 +5527,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMin,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -5535,6 +5540,7 @@ class DialogUtil { |
|
|
|
FilteringTextInputFormatter.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
counterText: "", // 隐藏默认的字符计数器
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.zero, //设置文字内容与边框距离
|
|
...
|
...
|
@@ -5598,6 +5604,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMax,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -5610,6 +5617,7 @@ class DialogUtil { |
|
|
|
FilteringTextInputFormatter.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
counterText: "", // 隐藏默认的字符计数器
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.zero, //设置文字内容与边框距离
|
|
...
|
...
|
@@ -6228,6 +6236,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMin,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -6240,6 +6249,7 @@ class DialogUtil { |
|
|
|
FilteringTextInputFormatter.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
counterText: "", // 隐藏默认的字符计数器
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.zero, //设置文字内容与边框距离
|
|
...
|
...
|
@@ -6303,6 +6313,7 @@ class DialogUtil { |
|
|
|
child: TextField(
|
|
|
|
controller: controllerMax,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
...
|
...
|
@@ -6316,6 +6327,7 @@ class DialogUtil { |
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
isCollapsed: true,
|
|
|
|
counterText: "", // 隐藏默认的字符计数器
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.zero, //设置文字内容与边框距离
|
|
|
|
|
|
...
|
...
|
@@ -7358,10 +7370,14 @@ class DialogUtil { |
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
FocusNode focusNode = FocusNode();
|
|
|
|
bool showArea = true;
|
|
|
|
areas.remove('全部');
|
|
|
|
bool showPnumMin = true;
|
|
|
|
bool showPnumMax = true;
|
|
|
|
String pnumMin = '';
|
|
|
|
String pnumMax = '';
|
|
|
|
// String pnumMin = '';
|
|
|
|
// String pnumMax = '';
|
|
|
|
|
|
|
|
TextEditingController controllerMax = TextEditingController();
|
|
|
|
TextEditingController controllerMin = TextEditingController();
|
|
|
|
// StateSetter globalState;
|
|
|
|
// //输入框焦点
|
|
|
|
// focusNode.addListener(() {
|
|
...
|
...
|
@@ -7556,38 +7572,202 @@ class DialogUtil { |
|
|
|
color:
|
|
|
|
MyColours.color_333333),
|
|
|
|
),
|
|
|
|
HEmptyView(40),
|
|
|
|
HEmptyView(5),
|
|
|
|
// Stack(
|
|
|
|
// overflow: Overflow.visible,
|
|
|
|
// children: [
|
|
|
|
btnChoose(pnumMin,
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMax = true;
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
HEmptyView(20),
|
|
|
|
// 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;
|
|
|
|
// });
|
|
|
|
// }),
|
|
|
|
Container(
|
|
|
|
width: w(76),
|
|
|
|
// margin: EdgeInsets.symmetric(
|
|
|
|
// horizontal: ScreenUtil().setWidth(44)),
|
|
|
|
height: w(30),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color:
|
|
|
|
MyColours.color_f3f3f3,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(10))),
|
|
|
|
child: TextField(
|
|
|
|
controller: controllerMin,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter
|
|
|
|
.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
counterText: "",
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding: EdgeInsets
|
|
|
|
.zero, //设置文字内容与边框距离
|
|
|
|
// enabledBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef),
|
|
|
|
// ),
|
|
|
|
// focusedBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// ),
|
|
|
|
// prefixText: '*',
|
|
|
|
// prefixStyle: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_E95750),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide.none),
|
|
|
|
hintText: '输入最小',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_BFC4D4,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.number,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
// btnChooseTableManagePnum(pnumMin, 'min',
|
|
|
|
// ScreenUtil().setWidth(54 * 2), (value) {
|
|
|
|
// state(() {
|
|
|
|
// showBaojian = true;
|
|
|
|
// showPnumMax = true;
|
|
|
|
// showPnumMin = !showPnumMin;
|
|
|
|
// });
|
|
|
|
// }),
|
|
|
|
HEmptyView(10),
|
|
|
|
Text(
|
|
|
|
'至',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize:
|
|
|
|
ScreenUtil().setSp(30),
|
|
|
|
color:
|
|
|
|
MyColours.color_199095),
|
|
|
|
MyColours.color_000000),
|
|
|
|
),
|
|
|
|
HEmptyView(10),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
width: w(76),
|
|
|
|
height: w(30),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color:
|
|
|
|
MyColours.color_f3f3f3,
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(
|
|
|
|
ScreenUtil()
|
|
|
|
.setWidth(10))),
|
|
|
|
child: TextField(
|
|
|
|
controller: controllerMax,
|
|
|
|
maxLines: 1,
|
|
|
|
maxLength: 3, // 设置最大输入字符数为3
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
//输入文本的样式
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
color: MyColours
|
|
|
|
.color_515151),
|
|
|
|
inputFormatters: [
|
|
|
|
FilteringTextInputFormatter
|
|
|
|
.digitsOnly
|
|
|
|
],
|
|
|
|
decoration: InputDecoration(
|
|
|
|
isCollapsed: true,
|
|
|
|
contentPadding: EdgeInsets
|
|
|
|
.zero, //设置文字内容与边框距离
|
|
|
|
counterText:
|
|
|
|
"", // 隐藏默认的字符计数器
|
|
|
|
|
|
|
|
// enabledBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef),
|
|
|
|
// ),
|
|
|
|
// focusedBorder: UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide(
|
|
|
|
// color: MyColours.color_efefef,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// ),
|
|
|
|
// prefixText: '*',
|
|
|
|
// prefixStyle: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(32),
|
|
|
|
// color: MyColours.color_E95750),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide:
|
|
|
|
BorderSide.none),
|
|
|
|
hintText: '输入最大',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours
|
|
|
|
.color_BFC4D4,
|
|
|
|
fontSize: ScreenUtil()
|
|
|
|
.setSp(30),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
state(() {});
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType:
|
|
|
|
TextInputType.number,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
btnChoose(pnumMax,
|
|
|
|
ScreenUtil().setWidth(54 * 2),
|
|
|
|
(value) {
|
|
|
|
state(() {
|
|
|
|
showArea = true;
|
|
|
|
showPnumMin = true;
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -7611,12 +7791,49 @@ class DialogUtil { |
|
|
|
//最高人数
|
|
|
|
// pnumMax
|
|
|
|
|
|
|
|
if (controllerMax.text
|
|
|
|
.trim()
|
|
|
|
.length >
|
|
|
|
0 &&
|
|
|
|
controllerMin.text
|
|
|
|
.trim()
|
|
|
|
.length >
|
|
|
|
0) {
|
|
|
|
if (int.parse(controllerMin.text
|
|
|
|
.trim()) >
|
|
|
|
int.parse(controllerMax.text
|
|
|
|
.trim())) {
|
|
|
|
Utils.showToast(
|
|
|
|
'最大人数不能小于最小人数!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (int.parse(controllerMin.text
|
|
|
|
.trim()) ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('最小人数不能为0!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (int.parse(controllerMax.text
|
|
|
|
.trim()) ==
|
|
|
|
0) {
|
|
|
|
Utils.showToast('最大人数不能为0!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (int.parse(controllerMax.text
|
|
|
|
.trim()) >
|
|
|
|
999) {
|
|
|
|
Utils.showToast(
|
|
|
|
'最大人数不能超过999!');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
onTap!({
|
|
|
|
'areaname':
|
|
|
|
areas[currentAreaIndex!],
|
|
|
|
'name': controller.text,
|
|
|
|
'pnumMin': pnumMin,
|
|
|
|
'pnumMax': pnumMax
|
|
|
|
'pnumMin': controllerMin.text,
|
|
|
|
'pnumMax': controllerMax.text
|
|
|
|
});
|
|
|
|
if (Navigator.canPop(context)) {
|
|
|
|
Navigator.pop(context);
|
|
...
|
...
|
@@ -7667,34 +7884,34 @@ class DialogUtil { |
|
|
|
color: Colors.transparent)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(136 * 2),
|
|
|
|
top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMin,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMin = !showPnumMin;
|
|
|
|
pnumMin = pnum[index as int];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
Positioned(
|
|
|
|
left: ScreenUtil().setWidth(223 * 2),
|
|
|
|
top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: Offstage(
|
|
|
|
offstage: showPnumMax,
|
|
|
|
child: selectWidget(pnum, (index) {
|
|
|
|
state(() {
|
|
|
|
showPnumMax = !showPnumMax;
|
|
|
|
pnumMax = pnum[index as int];
|
|
|
|
});
|
|
|
|
}),
|
|
|
|
))),
|
|
|
|
// Positioned(
|
|
|
|
// left: ScreenUtil().setWidth(136 * 2),
|
|
|
|
// top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
// child: Offstage(
|
|
|
|
// offstage: showPnumMin,
|
|
|
|
// child: Material(
|
|
|
|
// color: Colors.transparent,
|
|
|
|
// child: selectWidget(pnum, (index) {
|
|
|
|
// state(() {
|
|
|
|
// showPnumMin = !showPnumMin;
|
|
|
|
// pnumMin = pnum[index as int];
|
|
|
|
// });
|
|
|
|
// }),
|
|
|
|
// ))),
|
|
|
|
// Positioned(
|
|
|
|
// left: ScreenUtil().setWidth(223 * 2),
|
|
|
|
// top: ScreenUtil().setWidth(221 * 2),
|
|
|
|
// child: Material(
|
|
|
|
// color: Colors.transparent,
|
|
|
|
// child: Offstage(
|
|
|
|
// offstage: showPnumMax,
|
|
|
|
// child: selectWidget(pnum, (index) {
|
|
|
|
// state(() {
|
|
|
|
// showPnumMax = !showPnumMax;
|
|
|
|
// pnumMax = pnum[index as int];
|
|
|
|
// });
|
|
|
|
// }),
|
|
|
|
// ))),
|
|
|
|
])));
|
|
|
|
});
|
|
|
|
});
|
...
|
...
|
|