Browse Source

safety

master
fmk 3 years ago
parent
commit
8d1f3e08be
  1. 34
      lib/store/store_order.dart
  2. 21
      lib/store/store_view/store_order_list.dart

34
lib/store/store_order.dart

@ -43,7 +43,7 @@ class StoreOrderPage extends StatefulWidget {
}
class _StoreOrderPage extends State<StoreOrderPage>
with TickerProviderStateMixin /*, AutomaticKeepAliveClientMixin*/ {
with TickerProviderStateMixin {
TabController tabcontroller;
ApiService apiService;
MinApiService minService;
@ -125,9 +125,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
await minService.getParentInfo("$tableId").catchError((error) {
debugPrint(error);
});
if (baseData != null && baseData.isSuccess) {
}
if (baseData != null && baseData.isSuccess) {}
}
///
@ -164,6 +162,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
}
}
RefreshController refreshController;
@override
Widget build(BuildContext context) {
return Stack(
@ -173,14 +173,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
right: 0,
top: 0,
bottom: 54.h,
child: DefaultTabController(
length: 2,
child: NestedScrollView(
controller: controller,
dragStartBehavior: DragStartBehavior.start,
physics: BouncingScrollPhysics(),
headerSliverBuilder:
(BuildContext context, bool innerBoxIsScrolled) {
headerSliverBuilder: (BuildContext context, bool innerScrolled) {
return [
SliverOverlapAbsorber(
handle: NestedScrollView.sliverOverlapAbsorberHandleFor(
@ -319,8 +316,9 @@ class _StoreOrderPage extends State<StoreOrderPage>
];
},
body: TabBarView(
physics: BouncingScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
children: [
///
StoreOrderListPage(
widget.arguments,
activitys,
@ -338,8 +336,18 @@ class _StoreOrderPage extends State<StoreOrderPage>
],
controller: tabcontroller,
),
),
),
),/*SmartRefresher(
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
queryStoreInfo();
},
child:
),*/
),
Positioned(
bottom: 0,
@ -446,9 +454,11 @@ class _StoreOrderPage extends State<StoreOrderPage>
);
}
///
showPeopleNum(String tableName) async {
var people = await showDialog(
context: context,
barrierDismissible: false,
builder: (context) {
return PeopleNumView(tableName);
},
@ -458,6 +468,8 @@ class _StoreOrderPage extends State<StoreOrderPage>
setState(() {
this.numberOfPeople = people;
});
} else {
Navigator.of(context).pop();
}
}

21
lib/store/store_view/store_order_list.dart

@ -70,10 +70,10 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
await minService.findMiNiGroupList({
"id": widget.arguments["id"],
}).catchError((error) {
refreshController.refreshFailed();
// refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
refreshController.refreshCompleted();
// refreshController.refreshCompleted();
setState(() {
appletProducts = baseData.data;
productListBeans.clear();
@ -81,11 +81,11 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
productListBeans.addAll(appletProducts[isSelected].productList);
});
} else {
refreshController.refreshFailed();
// refreshController.refreshFailed();
}
}
RefreshController refreshController;
// RefreshController refreshController;
@override
Widget build(BuildContext context) {
@ -95,17 +95,6 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
margin: EdgeInsets.only(
top: (MediaQuery.of(context).padding.top + 38 + kToolbarHeight),
),
child: SmartRefresher(
controller: refreshController =
RefreshController(initialRefresh: false),
enablePullDown: true,
enablePullUp: false,
header: MyHeader(),
physics: BouncingScrollPhysics(),
onRefresh: () {
appletGoods();
},
child: SingleChildScrollView(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
@ -139,8 +128,6 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
),
],
),
),
),
);
}

Loading…
Cancel
Save