Skip to content

Commit 8268a0d

Browse files
committed
fix: missing overscroll dragDetails updates
1 parent 811e960 commit 8268a0d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 3.1.2
22
- Deprecated the *withRotation* argument of the *CustomMaterialIndicator* widget. The rotation function will be removed in the upcoming version.
3+
- Fixed missing drag detail (*IndicatorController.dragDetails*) information from scroll events.
34
## 3.1.1
45
- Fix:
56
- Fixed *durations* parameter of *CustomRefreshIndicator* widget. Reported by [@jccd1996](https://github.com/jccd1996) in [#58](https://github.com/gonuit/flutter-custom-refresh-indicator/issues/58).

lib/src/custom_refresh_indicator.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,8 @@ class CustomRefreshIndicatorState extends State<CustomRefreshIndicator>
379379
}
380380

381381
bool _handleOverscrollNotification(OverscrollNotification notification) {
382+
controller.setIndicatorDragDetails(notification.dragDetails);
383+
382384
if (!controller.hasEdge) {
383385
controller.setIndicatorEdge(
384386
notification.overscroll.isNegative
@@ -399,7 +401,9 @@ class CustomRefreshIndicatorState extends State<CustomRefreshIndicator>
399401
}
400402

401403
bool _handleScrollEndNotification(ScrollEndNotification notification) {
402-
controller.clearPhysicsState();
404+
controller
405+
..setIndicatorDragDetails(null)
406+
..clearPhysicsState();
403407

404408
if (controller.state.isArmed) {
405409
_start();

0 commit comments

Comments
 (0)