Commit e8dca8aa authored by 朱翠翠's avatar 朱翠翠

Merge branch 'test' of http://git.wanmeizhensuo.com/linshengyu/gm_flutter into zcc/flutter

 Conflicts:
	lib/ClueModel/page/PlansCompareFeed/PlansCompareFeedItemView.dart
parents a90cb17a e4a4ead0
...@@ -51,6 +51,7 @@ class DiscussLowPriceModel extends BaseModel { ...@@ -51,6 +51,7 @@ class DiscussLowPriceModel extends BaseModel {
.givePhoneAuth(DioUtil.getInstance().getDio(), leadPhoneRequestId) .givePhoneAuth(DioUtil.getInstance().getDio(), leadPhoneRequestId)
.listen((event) { .listen((event) {
if (event.error == 0) { if (event.error == 0) {
NativeToast.showNativeToast("提交成功,请留意机构来电~");
} else { } else {
NativeToast.showNativeToast(event.message); NativeToast.showNativeToast(event.message);
} }
......
...@@ -119,12 +119,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> { ...@@ -119,12 +119,10 @@ class PlanCompareDetailPageState extends BaseState<PlanCompareDetailPage> {
Groups group = data.data.second[newIndex]; Groups group = data.data.second[newIndex];
Widget widget; Widget widget;
if (group.groupType == 'hot') { if (group.groupType == 'hot') {
widget = Container( widget = planPopularityView(group);
child: planPopularityView(group),
// height: 100, // height: 100,
// alignment: Alignment.center, // alignment: Alignment.center,
// child: baseText("第一个", 15, Colors.black), // child: baseText("第一个", 15, Colors.black),
);
} else if (group.groupType == 'normal_attrs') { } else if (group.groupType == 'normal_attrs') {
widget = Container( widget = Container(
child: planNormalEffectiveAttrsView(group), child: planNormalEffectiveAttrsView(group),
......
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_common/commonModel/toast/NativeToast.dart'; import 'package:flutter_common/commonModel/toast/NativeToast.dart';
import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart'; import 'package:gm_flutter/ClueModel/server/entity/PlansCompareFeed.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart'; import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/base/BaseState.dart'; import 'package:gm_flutter/commonModel/base/BaseState.dart';
import 'package:gm_flutter/commonModel/util/DartUtil.dart';
import 'CallBackCompareItem.dart'; import 'CallBackCompareItem.dart';
...@@ -49,30 +51,28 @@ class _PlansCompareFeedItemViewState ...@@ -49,30 +51,28 @@ class _PlansCompareFeedItemViewState
width: double.maxFinite, width: double.maxFinite,
height: 90, height: 90,
alignment: Alignment.centerLeft, alignment: Alignment.centerLeft,
padding: EdgeInsets.only(top: 20, bottom: 20), padding: EdgeInsets.only(top: 15, bottom: 15),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
GestureDetector( Container(
behavior: HitTestBehavior.opaque, alignment: Alignment.center,
onTap: () => onClickCheckBox(_icon), child: Image.asset(
child: Container( _icon,
alignment: Alignment.center, width: 17,
child: Image.asset( height: 17,
_icon, ),
width: 17, ),
height: 17,
fit: BoxFit.fill,
))),
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
width: 50, child: ClipRRect(
height: 50, borderRadius: BorderRadius.circular(4.0),
decoration: BoxDecoration( child: CachedNetworkImage(
borderRadius: BorderRadius.circular(4.0), imageUrl: widget.plan.projectImage,
image: DecorationImage( width: 50,
fit: BoxFit.fill, height: 50,
image: NetworkImage(widget.plan.projectImage), fit: BoxFit.cover,
)), ),
),
), ),
Expanded( Expanded(
child: Column( child: Column(
...@@ -91,10 +91,17 @@ class _PlansCompareFeedItemViewState ...@@ -91,10 +91,17 @@ class _PlansCompareFeedItemViewState
style: TextStyle( style: TextStyle(
fontSize: 11, color: Color(0xFF282828))), fontSize: 11, color: Color(0xFF282828))),
TextSpan( TextSpan(
text: widget.plan.positiveRate, text:
"${(widget.plan.positiveRate.contains(".") ? widget.plan.positiveRate.split(".")[0] : widget.plan.positiveRate).replaceAll("%", "")}",
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xFFFF5963), color: Color(0xFFFF5963),
fontWeight: FontWeight.w500)),
TextSpan(
text: "%",
style: TextStyle(
fontSize: 11,
color: Color(0xFFFF5963),
fontWeight: FontWeight.w500)) fontWeight: FontWeight.w500))
])), ])),
], ],
...@@ -114,7 +121,9 @@ class _PlansCompareFeedItemViewState ...@@ -114,7 +121,9 @@ class _PlansCompareFeedItemViewState
) )
], ],
), ),
); ).gestureDetector(() {
onClickCheckBox(_icon);
});
} }
getSecondLevelItem() { getSecondLevelItem() {
......
...@@ -168,9 +168,13 @@ class LevelOneListState extends State<LevelOneList> ...@@ -168,9 +168,13 @@ class LevelOneListState extends State<LevelOneList>
double height = MediaQuery.of(context).size.height - double height = MediaQuery.of(context).size.height -
40 - 40 -
widget.topHeight - widget.topHeight -
totalHeight; totalHeight
// - 55
// - 40
;
return SliverToBoxAdapter( return SliverToBoxAdapter(
child: Container( child: Container(
color: Color(0xffF7F6FA),
height: height < 0 ? 0 : height, height: height < 0 ? 0 : height,
), ),
); );
...@@ -179,7 +183,7 @@ class LevelOneListState extends State<LevelOneList> ...@@ -179,7 +183,7 @@ class LevelOneListState extends State<LevelOneList>
], ],
), onLoading: () { ), onLoading: () {
_model.loadMore(); _model.loadMore();
}, pullDown: false, pullUp: true); }, pullDown: false, pullUp: true,loadMoreColor: Color(0xffF7F6FA));
} }
@override @override
......
...@@ -12,6 +12,7 @@ import 'package:flutter/cupertino.dart'; ...@@ -12,6 +12,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart'; import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart'; import 'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'; import 'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart';
import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart'; import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart';
import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart'; import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart';
...@@ -132,6 +133,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -132,6 +133,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Expanded( Expanded(
child: newHomeWarp(), child: newHomeWarp(),
), ),
Container(
height: 0.5,
width: double.maxFinite,
color: Color(0xffE5E5E5),
),
bottomWidget(), bottomWidget(),
], ],
))), () { ))), () {
...@@ -175,8 +181,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -175,8 +181,8 @@ class LevelOneState extends BaseState<LevelOnePage>
}, },
child: newHome(), child: newHome(),
)), )),
baseSliverTitle( baseSliverTitle("${widget.title}", MediaQuery.of(context).size.width,
"${widget.title}", MediaQuery.of(context).size.width, _model.textLive), _model.textLive),
baseSliverBack(() { baseSliverBack(() {
if (RouterCenterImpl().findMainRouter().isWithNative()) { if (RouterCenterImpl().findMainRouter().isWithNative()) {
FlutterBoost.singleton.closeCurrent(); FlutterBoost.singleton.closeCurrent();
...@@ -245,6 +251,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -245,6 +251,7 @@ class LevelOneState extends BaseState<LevelOnePage>
} }
Widget head() { Widget head() {
print("SCRRNWIDTH ${MediaQuery.of(context).size.width}");
return Container( return Container(
key: keyTop, key: keyTop,
width: double.maxFinite, width: double.maxFinite,
...@@ -280,8 +287,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -280,8 +287,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Positioned( Positioned(
bottom: 8, bottom: 8,
left: 15, left: 15,
child: baseText( child: Container(
_model.planoverItem.planDescription, 12, Color(0xff999999)), width: MediaQuery.of(context).size.width - 30 - 100,
child: baseText("${_model.planoverItem.planDescription}", 12,
Color(0xff999999)),
),
), ),
Positioned( Positioned(
right: 0, right: 0,
...@@ -307,11 +317,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -307,11 +317,11 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 4), margin: EdgeInsets.only(left: 4),
child: baseText( child: baseText(
"${_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate}", "${(_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate).replaceAll("%", "")}",
20, 20,
Color(0xffFF5963)), Color(0xffFF5963)),
), ),
// baseText("%", 11, Color(0xffFF5963)), baseText("%", 11, Color(0xffFF5963)),
], ],
), ),
), ),
...@@ -345,7 +355,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -345,7 +355,7 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Text( child: Text(
element.attrName, element.attrValue,
textScaleFactor: 1.0, textScaleFactor: 1.0,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
...@@ -360,7 +370,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -360,7 +370,7 @@ class LevelOneState extends BaseState<LevelOnePage>
Container( Container(
margin: EdgeInsets.only(left: 2, right: 2), margin: EdgeInsets.only(left: 2, right: 2),
child: Text( child: Text(
element.attrValue, element.attrName,
textScaleFactor: 1.0, textScaleFactor: 1.0,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
...@@ -431,15 +441,20 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -431,15 +441,20 @@ class LevelOneState extends BaseState<LevelOnePage>
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
constraints: BoxConstraints( width: 52,
maxWidth: 52, // constraints: BoxConstraints(
), // maxWidth: 52,
// minWidth:
// ),
child: Text( child: Text(
element.attrName, element.attrName.length == 2
? "${element.attrName.substring(0,1)} ${element.attrName.substring(1,2)}"
: element.attrName,
textScaleFactor: 1.0, textScaleFactor: 1.0,
softWrap: true, softWrap: true,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
textAlign: TextAlign.start,
style: TextStyle( style: TextStyle(
decoration: TextDecoration.none, decoration: TextDecoration.none,
fontSize: 13, fontSize: 13,
...@@ -481,14 +496,11 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -481,14 +496,11 @@ class LevelOneState extends BaseState<LevelOnePage>
} }
Widget bottomWidget() { Widget bottomWidget() {
return Align( return Container(
alignment: Alignment.bottomCenter,
child: Container(
width: double.maxFinite, width: double.maxFinite,
height: 55, height: 55,
color: Colors.white, color: Colors.white,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
GestureDetector( GestureDetector(
...@@ -501,7 +513,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -501,7 +513,7 @@ class LevelOneState extends BaseState<LevelOnePage>
false); false);
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 18), margin: EdgeInsets.only(left: 21),
width: 30, width: 30,
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
...@@ -519,6 +531,9 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -519,6 +531,9 @@ class LevelOneState extends BaseState<LevelOnePage>
), ),
), ),
), ),
Expanded(
child: Container(),
),
GestureDetector( GestureDetector(
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
...@@ -537,8 +552,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -537,8 +552,7 @@ class LevelOneState extends BaseState<LevelOnePage>
..show(context); ..show(context);
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 15), width: ScreenUtil().setWidth(137),
width: 135,
height: 40, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xff51CDC7), color: Color(0xff51CDC7),
...@@ -571,8 +585,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -571,8 +585,8 @@ class LevelOneState extends BaseState<LevelOnePage>
context, widget.PAGE_NAME, "${widget.planId}", "", ""); context, widget.PAGE_NAME, "${widget.planId}", "", "");
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 15), margin: EdgeInsets.only(left: 15,right: 15),
width: 135, width: ScreenUtil().setWidth(137),
height: 40, height: 40,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffF96079), color: Color(0xffF96079),
...@@ -580,12 +594,10 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -580,12 +594,10 @@ class LevelOneState extends BaseState<LevelOnePage>
alignment: Alignment.center, alignment: Alignment.center,
child: baseText("获取底价", 14, Colors.white, bold: true), child: baseText("获取底价", 14, Colors.white, bold: true),
)), )),
Expanded(
child: Container(),
)
], ],
), ),
)); );
} }
// Widget home() { // Widget home() {
......
...@@ -13,6 +13,7 @@ import 'package:flutter/cupertino.dart'; ...@@ -13,6 +13,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart'; import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart'; import 'package:flutter_common/commonModel/picker/base/BaseBottomPicker.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart'; import 'package:gm_flutter/ClueModel/page/DiscussLowPrice/DiscussLowPricePopView.dart';
import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart'; import 'package:gm_flutter/ClueModel/page/common/StickyTabBarDelegate.dart';
import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart'; import 'package:gm_flutter/ClueModel/page/levelOne/LevelOneList.dart';
...@@ -126,6 +127,11 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -126,6 +127,11 @@ class LevelTwoState extends BaseState<LevelTwoPage>
Expanded( Expanded(
child: newHomeWarp(), child: newHomeWarp(),
), ),
Container(
height: 0.5,
width: double.maxFinite,
color: Color(0xffE5E5E5),
),
bottomWidget(), bottomWidget(),
], ],
)), )),
...@@ -457,110 +463,103 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -457,110 +463,103 @@ class LevelTwoState extends BaseState<LevelTwoPage>
// 底部按钮 // 底部按钮
Widget bottomWidget() { Widget bottomWidget() {
return Align( return Container(
alignment: Alignment.bottomCenter, width: double.maxFinite,
child: Container( height: 55,
width: double.maxFinite, color: Colors.white,
height: 55, child: Row(
color: Colors.white, crossAxisAlignment: CrossAxisAlignment.center,
child: Row( children: <Widget>[
mainAxisSize: MainAxisSize.min, GestureDetector(
crossAxisAlignment: CrossAxisAlignment.center, behavior: HitTestBehavior.opaque,
children: <Widget>[ onTap: () {
GestureDetector( RouterCenterImpl().findMainRouter().jumpPage(
behavior: HitTestBehavior.opaque, context,
onTap: () { "level_two_plan_compare",
RouterCenterImpl().findMainRouter().jumpPage( {"planType": 2, "planId": widget.planId},
context, false);
"level_two_plan_compare", },
{"planType": 2, "planId": widget.planId}, child: Container(
false); margin: EdgeInsets.only(left: 21),
}, width: 30,
child: Container( child: Column(
margin: EdgeInsets.only(left: 18), mainAxisSize: MainAxisSize.min,
width: 30, children: <Widget>[
child: Column( Container(
mainAxisSize: MainAxisSize.min, width: 22,
children: <Widget>[ height: 22,
Container( child: Image.asset("assets/vs_black.png"),
width: 22,
height: 22,
child: Image.asset("assets/vs_black.png"),
),
Container(
margin: EdgeInsets.only(top: 3),
child: baseText("去比较", 10, Color(0xff282828)),
)
],
), ),
), Container(
margin: EdgeInsets.only(top: 3),
child: baseText("去比较", 10, Color(0xff282828)),
)
],
), ),
GestureDetector( ),
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "show_login", null, true);
return;
}
BaseBottomPicker()
..setPicker(MechanismBox(widget.planId))
..show(context);
},
child: Container(
margin: EdgeInsets.only(left: 15),
width: 135,
height: 40,
decoration: BoxDecoration(
color: Color(0xff51CDC7),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("咨询", 14, Colors.white, bold: true),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance()
.get(MEMORY_CACHE)
.get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "show_login", null, true);
return;
}
Map<String, dynamic> map = {
"page_name": "level_two_plan_deatil",
"referrer_link": [],
"popup_name": "interested_plan"
};
RouterCenterImpl()
.findMainRouter()
.buriedEvent("popup_view", map);
DiscussLowPricePopView.showPopView(
context, widget.PAGE_NAME, "${widget.planId}", "", "");
},
child: Container(
margin: EdgeInsets.only(left: 15),
width: 135,
height: 40,
decoration: BoxDecoration(
color: Color(0xffF96079),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("获取底价", 14, Colors.white, bold: true),
)),
Expanded(
child: Container(),
)
],
), ),
)); GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "show_login", null, true);
return;
}
BaseBottomPicker()
..setPicker(MechanismBox(widget.planId))
..show(context);
},
child: Container(
width: ScreenUtil().setWidth(137),
height: 40,
decoration: BoxDecoration(
color: Color(0xff51CDC7),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("咨询", 14, Colors.white, bold: true),
)),
Expanded(
child: Container(),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if (CacheManager.getInstance().get(MEMORY_CACHE).get(USER_ID) ==
null &&
RouterCenterImpl().findMainRouter().isWithNative()) {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "show_login", null, true);
return;
}
Map<String, dynamic> map = {
"page_name": "level_two_plan_deatil",
"referrer_link": [],
"popup_name": "interested_plan"
};
RouterCenterImpl()
.findMainRouter()
.buriedEvent("popup_view", map);
DiscussLowPricePopView.showPopView(
context, widget.PAGE_NAME, "${widget.planId}", "", "");
},
child: Container(
margin: EdgeInsets.only(left: 15,right: 15),
width: ScreenUtil().setWidth(137),
height: 40,
decoration: BoxDecoration(
color: Color(0xffF96079),
borderRadius: BorderRadius.circular(20)),
alignment: Alignment.center,
child: baseText("获取底价", 14, Colors.white, bold: true),
)),
],
),
);
} }
} }
...@@ -32,6 +32,7 @@ class PlanItem extends StatelessWidget { ...@@ -32,6 +32,7 @@ class PlanItem extends StatelessWidget {
if (rate != null && rate.contains(".")) { if (rate != null && rate.contains(".")) {
rate = rate.split(".")[0]; rate = rate.split(".")[0];
} }
rate = rate.replaceAll("%", "");
return Container( return Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Container( child: Container(
...@@ -88,7 +89,8 @@ class PlanItem extends StatelessWidget { ...@@ -88,7 +89,8 @@ class PlanItem extends StatelessWidget {
Container( Container(
width: 4, width: 4,
), ),
baseText("${rate}%", 14, Color(0xffFF5963)) baseText("${rate}", 14, Color(0xffFF5963)),
baseText("%", 11, Color(0xffFF5963)),
], ],
), ),
), ),
......
...@@ -408,7 +408,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -408,7 +408,8 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
_model.loadMore(); _model.loadMore();
}, },
pullDown: false, pullDown: false,
pullUp: true)); pullUp: true,
loadMoreColor: Color(0xffF7F6FA)));
}, },
); );
} }
......
...@@ -112,7 +112,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin { ...@@ -112,7 +112,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
], ],
), onLoading: () { ), onLoading: () {
_model.loadMore(); _model.loadMore();
}, pullDown: false, pullUp: true); }, pullDown: false, pullUp: true,loadMoreColor: Color(0xffF7F6FA));
} }
@override @override
......
...@@ -62,7 +62,7 @@ class TestState extends BaseState<TestPage> { ...@@ -62,7 +62,7 @@ class TestState extends BaseState<TestPage> {
context, context,
RouterCenterImpl() RouterCenterImpl()
.findClueRouter() .findClueRouter()
.getPlansCompareFeed({"planId": 1, "planType": 1})); .getPlansCompareFeed({"planId": 1, "planType": 2}));
})); }));
list.add(listItem("榜单", () { list.add(listItem("榜单", () {
JumpUtil.jumpToPageRight(context, JumpUtil.jumpToPageRight(context,
......
...@@ -296,7 +296,8 @@ Widget baseRefreshView(RefreshController refreshController, ...@@ -296,7 +296,8 @@ Widget baseRefreshView(RefreshController refreshController,
bool pullDown = true, bool pullDown = true,
VoidCallback onLoading, VoidCallback onLoading,
ScrollController scrollController, ScrollController scrollController,
Widget customScrollView}) { Widget customScrollView,
Color loadMoreColor}) {
return SmartRefresher( return SmartRefresher(
enablePullDown: pullDown, enablePullDown: pullDown,
enablePullUp: pullUp, enablePullUp: pullUp,
...@@ -326,6 +327,7 @@ Widget baseRefreshView(RefreshController refreshController, ...@@ -326,6 +327,7 @@ Widget baseRefreshView(RefreshController refreshController,
repeat: true, reverse: false); repeat: true, reverse: false);
} }
return Container( return Container(
color: loadMoreColor ?? Colors.white,
height: 55.0, height: 55.0,
child: Center(child: body), child: Center(child: body),
); );
......
...@@ -159,10 +159,11 @@ class NestedScrollViewRefreshIndicatorState ...@@ -159,10 +159,11 @@ class NestedScrollViewRefreshIndicatorState
Animation<Color> _valueColor; Animation<Color> _valueColor;
Future<void> _pendingRefreshFuture; Future<void> _pendingRefreshFuture;
bool _isIndicatorAtTop=false; bool _isIndicatorAtTop;
double _dragOffset=0.0;
_RefreshIndicatorMode _mode=_RefreshIndicatorMode.drag;
double _dragOffset;
_RefreshIndicatorMode _mode;
static final Animatable<double> _threeQuarterTween = static final Animatable<double> _threeQuarterTween =
Tween<double>(begin: 0.0, end: 0.75); Tween<double>(begin: 0.0, end: 0.75);
...@@ -177,6 +178,9 @@ class NestedScrollViewRefreshIndicatorState ...@@ -177,6 +178,9 @@ class NestedScrollViewRefreshIndicatorState
func = (str) { func = (str) {
if (str == "refresh") { if (str == "refresh") {
if (mounted) { if (mounted) {
_isIndicatorAtTop = false;
_dragOffset = 0.0;
_mode = _RefreshIndicatorMode.drag;
_show(); _show();
} }
} }
...@@ -451,8 +455,7 @@ class NestedScrollViewRefreshIndicatorState ...@@ -451,8 +455,7 @@ class NestedScrollViewRefreshIndicatorState
final bool showIndeterminateIndicator = final bool showIndeterminateIndicator =
_mode == _RefreshIndicatorMode.refresh || _mode == _RefreshIndicatorMode.refresh ||
_mode == _RefreshIndicatorMode.done; _mode == _RefreshIndicatorMode.done;
return return Column(
Column(
children: <Widget>[ children: <Widget>[
Container( Container(
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
......
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