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

commit

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