Commit 553ec9d8 authored by 林生雨's avatar 林生雨

commit

parent da098708
...@@ -84,7 +84,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -84,7 +84,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override @override
Widget buildItem(BuildContext context) { Widget buildItem(BuildContext context) {
stateBarHeight = MediaQueryData.fromWindow(window).padding.top; stateBarHeight = MediaQueryData.fromWindow(window).padding.top;
topHeight=stateBarHeight+kToolbarHeight; topHeight = stateBarHeight + kToolbarHeight;
return Scaffold( return Scaffold(
body: MediaQuery.removePadding( body: MediaQuery.removePadding(
removeTop: true, removeTop: true,
...@@ -104,7 +104,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -104,7 +104,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
children: <Widget>[ children: <Widget>[
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height - topHeight, height:
MediaQuery.of(context).size.height - topHeight,
child: child(), child: child(),
), ),
StreamBuilder<List<double>>( StreamBuilder<List<double>>(
...@@ -496,6 +497,25 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -496,6 +497,25 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
if (_model.feedDatas != null && _model.feedDatas.length > 0) { if (_model.feedDatas != null && _model.feedDatas.length > 0) {
height = max(_model.feedDatas.length * 100.0, height); height = max(_model.feedDatas.length * 100.0, height);
} }
if (data.data.first == FAIL) {
return Container(
color: Color(0xffF7F6FA),
width: double.maxFinite,
height: height,
child: errorItem(MediaQuery.of(context).size.width, height, () {
_model.feedsLive.notifyView(Pair(LOADING, null));
_model.refreshFeed(true);
}),
);
}
if (data.data.first == LOADING) {
return Container(
color: Color(0xffF7F6FA),
width: double.maxFinite,
height: height,
child: loadingItem(),
);
}
return Container( return Container(
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
width: double.maxFinite, width: double.maxFinite,
......
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