|
|
|
@ -24,7 +24,7 @@ class StoreOrderPage extends StatefulWidget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _StoreOrderPage extends State<StoreOrderPage> |
|
|
|
|
with TickerProviderStateMixin, AutomaticKeepAliveClientMixin { |
|
|
|
|
with TickerProviderStateMixin/*, AutomaticKeepAliveClientMixin */{ |
|
|
|
|
TabController tabcontroller; |
|
|
|
|
ApiService apiService; |
|
|
|
|
StoreInfo storeInfo; |
|
|
|
@ -34,8 +34,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
void initState() { |
|
|
|
|
super.initState(); |
|
|
|
|
|
|
|
|
|
refreshController = RefreshController(initialRefresh: false); |
|
|
|
|
|
|
|
|
|
queryStoreInfo(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -72,13 +70,14 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
child: DefaultTabController( |
|
|
|
|
length: 2, |
|
|
|
|
child: SmartRefresher( |
|
|
|
|
controller: refreshController, |
|
|
|
|
controller: refreshController = |
|
|
|
|
RefreshController(initialRefresh: false), |
|
|
|
|
enablePullDown: true, |
|
|
|
|
enablePullUp: false, |
|
|
|
|
header: MyHeader(), |
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
onRefresh: () { |
|
|
|
|
setState(() {}); |
|
|
|
|
queryStoreInfo(); |
|
|
|
|
}, |
|
|
|
|
child: NestedScrollView( |
|
|
|
|
headerSliverBuilder: |
|
|
|
@ -88,10 +87,32 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
handle: NestedScrollView.sliverOverlapAbsorberHandleFor( |
|
|
|
|
context), |
|
|
|
|
sliver: SliverAppBar( |
|
|
|
|
title: Text(""), |
|
|
|
|
expandedHeight: 365.h, |
|
|
|
|
title: Text( |
|
|
|
|
"百年川椒", |
|
|
|
|
style: TextStyle( |
|
|
|
|
color: Colors.black, |
|
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
|
fontSize: 18.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
expandedHeight: (storeInfo != null && storeInfo.couponVOList != null) ? 425.h : 365.h, |
|
|
|
|
floating: false, |
|
|
|
|
snap: false, |
|
|
|
|
leading: GestureDetector( |
|
|
|
|
onTap: () { |
|
|
|
|
Navigator.of(context).pop(); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
alignment: Alignment.centerRight, |
|
|
|
|
margin: EdgeInsets.only(left: 10), |
|
|
|
|
padding: EdgeInsets.all(6), |
|
|
|
|
child: Icon( |
|
|
|
|
Icons.arrow_back_ios, |
|
|
|
|
color: Colors.black, |
|
|
|
|
size: 24, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
pinned: true, |
|
|
|
|
flexibleSpace: FlexibleSpaceBar( |
|
|
|
|
background: Stack( |
|
|
|
@ -194,10 +215,12 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
physics: BouncingScrollPhysics(), |
|
|
|
|
children: [ |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
height: MediaQuery.of(context).size.width, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
color: Colors.white, |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
height: MediaQuery.of(context).size.width, |
|
|
|
|
) |
|
|
|
@ -216,6 +239,6 @@ class _StoreOrderPage extends State<StoreOrderPage>
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
bool get wantKeepAlive => true; |
|
|
|
|
// @override |
|
|
|
|
// bool get wantKeepAlive => true; |
|
|
|
|
} |
|
|
|
|