Commit a1f45d9c authored by 杜欣's avatar 杜欣

Ui走查

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