Commit 24856199 authored by 林生雨's avatar 林生雨

Merge branch 'featrue/duxin' into 'test'

Ui走查

See merge request !54
parents 43f6782e fdd81eb9
...@@ -56,30 +56,32 @@ class MechanismBox implements IBottomPicker { ...@@ -56,30 +56,32 @@ 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(
decoration: BoxDecoration( child: Container(
borderRadius: BorderRadius.only( decoration: BoxDecoration(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)), borderRadius: BorderRadius.only(
color: Colors.white, topLeft: Radius.circular(10.0),
), topRight: Radius.circular(10.0)),
width: mq.size.width, color: Colors.white,
height: mq.size.height - mq.size.height / 5, ),
child: StreamBuilder( width: mq.size.width,
stream: _model.stateLive.stream, height: mq.size.height - mq.size.height / 5,
initialData: _model.stateLive.data ?? LOADING, child: StreamBuilder(
builder: (c, data) { stream: _model.stateLive.stream,
if (data.data == FAIL) { initialData: _model.stateLive.data ?? LOADING,
return errorItem(MediaQuery.of(context).size.width, builder: (c, data) {
MediaQuery.of(context).size.height, () { if (data.data == FAIL) {
_model.getQuestions(plan_id); return errorItem(MediaQuery.of(context).size.width,
}); MediaQuery.of(context).size.height, () {
} _model.getQuestions(plan_id);
if (data.data == LOADING) { });
return loadingItem(); }
} if (data.data == LOADING) {
return setupHome(mq, keyHeight, context); return loadingItem();
}, }
)); 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,31 +384,34 @@ class MechanismBox implements IBottomPicker { ...@@ -382,31 +384,34 @@ class MechanismBox implements IBottomPicker {
focusNode: focusNode, focusNode: focusNode,
textInputAction: TextInputAction.send, textInputAction: TextInputAction.send,
onSubmitted: (txt) { onSubmitted: (txt) {
if (txt.isNotEmpty) { int length = _model.doctor_ids.length;
_model.sendMessage( if (length > 3 || length == 0) {
_model.doctor_ids.join(','), NativeToast.showNativeToast('请选择1-3个机构咨询');
_model.hospital_ids.join(','), } else {
txt, if (txt.isNotEmpty) {
plan_id, (i) { _model.sendMessage(
if (i == 0) { _model.doctor_ids.join(','),
dismissCall(); _model.hospital_ids.join(','),
textController.text = ''; txt,
NativeToast.showNativeToast('消息已发送成功'); plan_id, (i) {
} if (i == 0) {
}); dismissCall();
textController.text = '';
NativeToast.showNativeToast('消息已发送成功');
}
});
}
} }
}, },
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