Browse Source

加入购物车板块滑动置顶优化

wr_2024_invoice
wurong 6 months ago
parent
commit
03c0376707
  1. 2
      lib/store/shop_details_page.dart

2
lib/store/shop_details_page.dart

@ -74,7 +74,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
storeId = widget.arguments["storeId"]; storeId = widget.arguments["storeId"];
isSetMeal = widget.arguments["isSetMeal"] ?? false; isSetMeal = widget.arguments["isSetMeal"] ?? false;
scrollController.addListener(() { scrollController.addListener(() {
print(scrollController.offset);
if(scIndex == 0 && scrollController.offset > 400){ if(scIndex == 0 && scrollController.offset > 400){
setState(() { setState(() {
scIndex = 1; scIndex = 1;
@ -109,6 +108,7 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
void dispose() { void dispose() {
super.dispose(); super.dispose();
refreshController.dispose(); refreshController.dispose();
scrollController.dispose();
} }
/// ///

Loading…
Cancel
Save