diff --git a/lib/common/widgets/flutter/refresh_indicator.dart b/lib/common/widgets/flutter/refresh_indicator.dart index 6c123df3e..1056034a0 100644 --- a/lib/common/widgets/flutter/refresh_indicator.dart +++ b/lib/common/widgets/flutter/refresh_indicator.dart @@ -301,10 +301,12 @@ class RefreshIndicatorState extends State // If the notification.dragDetails is null, this scroll is not triggered by // user dragging. It may be a result of ScrollController.jumpTo or ballistic scroll. // In this case, we don't want to trigger the refresh indicator. - return (notification is ScrollStartNotification && - notification.dragDetails != null) && + return _status == null && + ((notification is ScrollStartNotification && + notification.dragDetails != null) || + (notification is ScrollUpdateNotification && + notification.dragDetails != null)) && notification.metrics.extentBefore == 0.0 && - _status == null && _start(); } @@ -322,14 +324,14 @@ class RefreshIndicatorState extends State if (_status == RefreshIndicatorStatus.drag) { _dragOffset = _dragOffset! - notification.scrollDelta!; _checkDragOffset(notification.metrics.viewportDimension); - } - if (_status == RefreshIndicatorStatus.drag && - notification.dragDetails == null && - _valueColor.value!.a == _effectiveValueColor.a) { - // On iOS start the refresh when the Scrollable bounces back from the - // overscroll (ScrollNotification indicating this don't have dragDetails - // because the scroll activity is not directly triggered by a drag). - _show(); + + if (notification.dragDetails == null && + _valueColor.value!.a == _effectiveValueColor.a) { + // On iOS start the refresh when the Scrollable bounces back from the + // overscroll (ScrollNotification indicating this don't have dragDetails + // because the scroll activity is not directly triggered by a drag). + _show(); + } } } else if (notification is OverscrollNotification) { if (_status == RefreshIndicatorStatus.drag) { diff --git a/pubspec.lock b/pubspec.lock index ab400ba60..33419d91e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -497,7 +497,7 @@ packages: description: path: "." ref: mod - resolved-ref: e05573ab132777bb7dc3a7a54af533c1ed4350b2 + resolved-ref: e55d90cf2a1666e6ccf63e3f5779c8c4b12c5204 url: "https://github.com/bggRGjQaUbCoE/extended_nested_scroll_view.git" source: git version: "6.2.1"