Commit e56e58b0 authored by 朱翠翠's avatar 朱翠翠

Merge branch 'test' of http://git.wanmeizhensuo.com/linshengyu/gm_flutter into zcc/flutter

parents 9c0c815d 24856199
...@@ -56,10 +56,12 @@ class MechanismBox implements IBottomPicker { ...@@ -56,10 +56,12 @@ class MechanismBox implements IBottomPicker {
Widget build(BuildContext context) { Widget build(BuildContext context) {
MediaQueryData mq = MediaQuery.of(context); MediaQueryData mq = MediaQuery.of(context);
double keyHeight = MediaQuery.of(context).viewInsets.bottom; double keyHeight = MediaQuery.of(context).viewInsets.bottom;
return Container( return SafeArea(
child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), topLeft: Radius.circular(10.0),
topRight: Radius.circular(10.0)),
color: Colors.white, color: Colors.white,
), ),
width: mq.size.width, width: mq.size.width,
...@@ -79,7 +81,7 @@ class MechanismBox implements IBottomPicker { ...@@ -79,7 +81,7 @@ class MechanismBox implements IBottomPicker {
} }
return setupHome(mq, keyHeight, context); return setupHome(mq, keyHeight, context);
}, },
)); )));
} }
@override @override
...@@ -270,8 +272,8 @@ class MechanismBox implements IBottomPicker { ...@@ -270,8 +272,8 @@ class MechanismBox implements IBottomPicker {
baseText("¥", 12, Color(0xffFF5963)), baseText("¥", 12, Color(0xffFF5963)),
baseText( baseText(
hospital.minPrice == hospital.maxPrice hospital.minPrice == hospital.maxPrice
? "${hospital.minPrice}-${hospital.maxPrice}" ? "${hospital.minPrice}"
: "${hospital.minPrice}", : "${hospital.minPrice}-${hospital.maxPrice}",
15, 15,
Color(0xffFF5963), Color(0xffFF5963),
bold: true) bold: true)
...@@ -382,6 +384,10 @@ class MechanismBox implements IBottomPicker { ...@@ -382,6 +384,10 @@ class MechanismBox implements IBottomPicker {
focusNode: focusNode, focusNode: focusNode,
textInputAction: TextInputAction.send, textInputAction: TextInputAction.send,
onSubmitted: (txt) { onSubmitted: (txt) {
int length = _model.doctor_ids.length;
if (length > 3 || length == 0) {
NativeToast.showNativeToast('请选择1-3个机构咨询');
} else {
if (txt.isNotEmpty) { if (txt.isNotEmpty) {
_model.sendMessage( _model.sendMessage(
_model.doctor_ids.join(','), _model.doctor_ids.join(','),
...@@ -395,18 +401,17 @@ class MechanismBox implements IBottomPicker { ...@@ -395,18 +401,17 @@ class MechanismBox implements IBottomPicker {
} }
}); });
} }
}
}, },
style: style:
TextStyle(fontSize: 14, color: Color(0xff282828)), TextStyle(fontSize: 14, color: Color(0xff282828)),
maxLines: 1, maxLines: 1,
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.only( contentPadding:
left: 16, top: 0, bottom: 11.5, right: 16), EdgeInsets.only(left: 16, top: 12, bottom: 12, right: 16),
hintText: '请输入您想了解的问题', hintText: '请输入您想了解的问题',
hintStyle: TextStyle( hintStyle: TextStyle(
color: Color(0xff999999), color: Color(0xff999999), fontSize: 12),
fontSize: 12,
height: 2.3),
border: InputBorder.none)); border: InputBorder.none));
}, },
)) ))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment