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