|
|
|
@ -61,7 +61,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
List<FindMiniGroup>? appletProducts; |
|
|
|
|
List<ProductListBean> productListBeans = []; |
|
|
|
|
int currentIndex = 0; |
|
|
|
|
double _viewportDimension = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
late ShopScrollCoordinator _shopCoordinator; |
|
|
|
|
late ShopScrollController _listScrollController1; |
|
|
|
@ -74,7 +74,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
_listScrollController1 = _shopCoordinator.newChildScrollController(); |
|
|
|
|
_listScrollController2 = _shopCoordinator.newChildScrollController(); |
|
|
|
|
_listScrollController2.addListener(() { |
|
|
|
|
_viewportDimension = _listScrollController2.position.viewportDimension; |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < (appletProducts?.length ?? 0); i++) { |
|
|
|
|
if (currentIndex != i && _listScrollController2.offset >= (appletProducts?[i].goodsIndex ?? 0) && |
|
|
|
|
(i == (appletProducts?.length ?? 0) - 1 || _listScrollController2.offset < (appletProducts?[i + 1].goodsIndex ?? 0))) { |
|
|
|
@ -141,7 +141,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
width: 100, |
|
|
|
|
child: ListView.builder( |
|
|
|
|
itemCount: appletProducts?.length ?? 0, |
|
|
|
|
physics: AlwaysScrollableScrollPhysics(), |
|
|
|
|
physics: ClampingScrollPhysics(), |
|
|
|
|
controller: _listScrollController1, |
|
|
|
|
padding: EdgeInsets.only(top: 0, bottom: 12.h), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
@ -154,7 +154,7 @@ class _StoreOrderListPage extends State<StoreOrderListPage> {
|
|
|
|
|
itemCount: appletProducts?.length ?? 0, |
|
|
|
|
padding: EdgeInsets.only(top: 0), |
|
|
|
|
controller: _listScrollController2, |
|
|
|
|
physics: AlwaysScrollableScrollPhysics(), |
|
|
|
|
physics: ClampingScrollPhysics(), |
|
|
|
|
itemBuilder: (context, position) { |
|
|
|
|
return rightOrderItem(position); |
|
|
|
|
}, |
|
|
|
|