Commit a1f45d9c authored by 杜欣's avatar 杜欣

Ui走查

parent 588397a9
...@@ -63,7 +63,7 @@ class MechanismBox implements IBottomPicker { ...@@ -63,7 +63,7 @@ class MechanismBox implements IBottomPicker {
color: Colors.white, color: Colors.white,
), ),
width: mq.size.width, width: mq.size.width,
height: mq.size.height - 140, height: mq.size.height - mq.size.height / 5,
child: StreamBuilder( child: StreamBuilder(
stream: _model.stateLive.stream, stream: _model.stateLive.stream,
initialData: _model.stateLive.data ?? LOADING, initialData: _model.stateLive.data ?? LOADING,
...@@ -93,6 +93,7 @@ class MechanismBox implements IBottomPicker { ...@@ -93,6 +93,7 @@ class MechanismBox implements IBottomPicker {
} }
setupHome(mq, keyHeight, BuildContext context) { setupHome(mq, keyHeight, BuildContext context) {
var heigth = mq.size.height - (mq.size.height / 5) - 146 - keyHeight;
return Column( return Column(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
...@@ -104,24 +105,22 @@ class MechanismBox implements IBottomPicker { ...@@ -104,24 +105,22 @@ class MechanismBox implements IBottomPicker {
if (data.data == LOADING) { if (data.data == LOADING) {
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: mq.size.height - 140 - 96 - 50 - keyHeight, height: heigth,
child: loadingItem(), child: loadingItem(),
); );
} }
if (data.data == FAIL) { if (data.data == FAIL) {
return errorItem(MediaQuery.of(context).size.width, return errorItem(MediaQuery.of(context).size.width, heigth, () {
mq.size.height - 140 - 96 - 50 - keyHeight, () {
_model.refreshView(true); _model.refreshView(true);
}); });
} }
if (data.data == EMPTY) { if (data.data == EMPTY) {
return emptyItem(MediaQuery.of(context).size.width, return emptyItem(MediaQuery.of(context).size.width, heigth)
mq.size.height - 140 - 96 - 50 - keyHeight)
.gestureDetector(() { .gestureDetector(() {
focusNode.unfocus(); focusNode.unfocus();
}); });
} }
return mechanismList(mq, keyHeight); return mechanismList(mq, heigth);
}, },
), ),
bottomMessage(context) bottomMessage(context)
...@@ -165,9 +164,9 @@ class MechanismBox implements IBottomPicker { ...@@ -165,9 +164,9 @@ class MechanismBox implements IBottomPicker {
} }
// 机构列表 // 机构列表
Widget mechanismList(mq, keyHeight) { Widget mechanismList(mq, heigth) {
return Container( return Container(
height: mq.size.height - 286 - keyHeight, height: heigth,
width: mq.size.width, width: mq.size.width,
padding: EdgeInsets.only(left: 15, right: 15), padding: EdgeInsets.only(left: 15, right: 15),
child: baseRefreshView(refreshController, () {}, null, null, child: baseRefreshView(refreshController, () {}, null, null,
...@@ -383,7 +382,6 @@ class MechanismBox implements IBottomPicker { ...@@ -383,7 +382,6 @@ class MechanismBox implements IBottomPicker {
focusNode: focusNode, focusNode: focusNode,
textInputAction: TextInputAction.send, textInputAction: TextInputAction.send,
onSubmitted: (txt) { onSubmitted: (txt) {
print(_model.hospital_ids.toList());
if (txt.isNotEmpty) { if (txt.isNotEmpty) {
_model.sendMessage( _model.sendMessage(
_model.doctor_ids.join(','), _model.doctor_ids.join(','),
......
...@@ -102,7 +102,6 @@ class MechanismModel extends BaseModel { ...@@ -102,7 +102,6 @@ class MechanismModel extends BaseModel {
.sendMessage(DioUtil.getInstance().getDio(), doctor_ids, hospital_ids, .sendMessage(DioUtil.getInstance().getDio(), doctor_ids, hospital_ids,
question, plan_id) question, plan_id)
.listen((event) { .listen((event) {
print(event.toJson());
if (event.error == 0) { if (event.error == 0) {
func(0); func(0);
messageLive.notifyView(event.data.success); messageLive.notifyView(event.data.success);
......
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