Commit ef284932 authored by 朱璇's avatar 朱璇

Merge branch 'test' of git.wanmeizhensuo.com:linshengyu/gm_flutter into zx/gmFlutter

parents 8e008693 da20614b
......@@ -173,15 +173,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
},
child: newHome(),
)),
// Positioned(
// top: 44,
// left: 60,
// child: Container(
// alignment: Alignment.center,
// width: MediaQuery.of(context).size.width - 100,
// child: baseText(_model.name, 18, Color(0xff333333)),
// ),
// ),
baseSliverTitle("${_model.name}", MediaQuery.of(context).size.width,
_model.textLive),
baseSliverBack(() {
if (RouterCenterImpl().findMainRouter().isWithNative()) {
FlutterBoost.singleton.closeCurrent();
......
......@@ -56,32 +56,30 @@ class MechanismBox implements IBottomPicker {
Widget build(BuildContext context) {
MediaQueryData mq = MediaQuery.of(context);
double keyHeight = MediaQuery.of(context).viewInsets.bottom;
return SafeArea(
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0),
topRight: Radius.circular(10.0)),
color: Colors.white,
),
width: mq.size.width,
height: mq.size.height - mq.size.height / 5,
child: StreamBuilder(
stream: _model.stateLive.stream,
initialData: _model.stateLive.data ?? LOADING,
builder: (c, data) {
if (data.data == FAIL) {
return errorItem(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height, () {
_model.getQuestions(plan_id);
});
}
if (data.data == LOADING) {
return loadingItem();
}
return setupHome(mq, keyHeight, context);
},
)));
return Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
color: Colors.white,
),
width: mq.size.width,
height: mq.size.height - mq.size.height / 5,
child: StreamBuilder(
stream: _model.stateLive.stream,
initialData: _model.stateLive.data ?? LOADING,
builder: (c, data) {
if (data.data == FAIL) {
return errorItem(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height, () {
_model.getQuestions(plan_id);
});
}
if (data.data == LOADING) {
return loadingItem();
}
return setupHome(mq, keyHeight, context);
},
));
}
@override
......@@ -95,7 +93,9 @@ class MechanismBox implements IBottomPicker {
}
setupHome(mq, keyHeight, BuildContext context) {
var heigth = mq.size.height - (mq.size.height / 5) - 146 - keyHeight;
final double bottomPadding = MediaQuery.of(context).padding.bottom;
var heigth =
mq.size.height - (mq.size.height / 5) - 146 - bottomPadding - keyHeight;
return Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[
......@@ -125,7 +125,7 @@ class MechanismBox implements IBottomPicker {
return mechanismList(mq, heigth);
},
),
bottomMessage(context)
bottomMessage(context, bottomPadding)
],
);
}
......@@ -223,7 +223,7 @@ class MechanismBox implements IBottomPicker {
_model.cardsLive.notifyView(_model.cardsLive.data);
int length = _model.doctor_ids.length;
if (length > 3 || length == 0) {
NativeToast.showNativeToast('请选1-3个机构咨询');
NativeToast.showNativeToast('请选���1-3个机构咨询');
}
},
child: Container(
......@@ -299,9 +299,9 @@ class MechanismBox implements IBottomPicker {
}
// 底部输入框部分
Widget bottomMessage(context) {
Widget bottomMessage(context, bottomPadding) {
return Container(
height: 96,
height: 96 + bottomPadding,
color: Color(0xffF9F8FB),
child: Column(
children: <Widget>[
......@@ -407,8 +407,8 @@ class MechanismBox implements IBottomPicker {
TextStyle(fontSize: 14, color: Color(0xff282828)),
maxLines: 1,
decoration: InputDecoration(
contentPadding:
EdgeInsets.only(left: 16, top: 12, bottom: 12, right: 16),
contentPadding: EdgeInsets.only(
left: 16, top: 12, bottom: 12, right: 16),
hintText: '请输入您想了解的问题',
hintStyle: TextStyle(
color: Color(0xff999999), fontSize: 12),
......
......@@ -30,7 +30,7 @@ class TestState extends BaseState<TestPage> {
list.add(listItem("一级列表页", () {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "level_one_plan_detail", {"planId": 647}, false);
.jumpPage(context, "level_one_plan_detail", {"planId": 3580}, false);
}));
list.add(listItem("二级列表页", () {
RouterCenterImpl()
......
......@@ -149,6 +149,7 @@ Widget netErrorItem() {}
Widget errorItem(double width, double height, VoidCallback retry,
{String errorText, String retryText, double paddingTop}) {
return Container(
color: Colors.white,
width: width,
height: height,
padding: EdgeInsets.only(top: paddingTop ?? 0),
......@@ -514,7 +515,7 @@ Widget baseSliverAppBar(String url,
Widget baseSliverBack(VoidCallback tap) {
return Positioned(
top: 40,
top: 45,
left: 7,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
......@@ -537,7 +538,7 @@ Widget baseSliverBack(VoidCallback tap) {
Widget baseSliverTitle(String text, double width, LiveData liveData) {
return Positioned(
top: 42,
top: 46,
child: StreamBuilder(
stream: liveData.stream,
initialData: liveData.data ?? 0.0,
......@@ -547,7 +548,7 @@ Widget baseSliverTitle(String text, double width, LiveData liveData) {
child: Container(
alignment: Alignment.center,
width: width,
child: baseText(text, 18, Color(0xff333333)),
child: baseText(text, 18, Color(0xff333333), bold: true),
),
);
},
......
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