xuelongqy / flutter_easy_refresh

A flutter widget that provides pull-down refresh and pull-up load.
https://xuelongqy.github.io/flutter_easy_refresh/
MIT License
3.9k stars 635 forks source link

EasyRefreshPhysics.applyBoundaryConditions returned invalid overscroll value. #650

Open WangDan1989 opened 1 year ago

WangDan1989 commented 1 year ago

======== Exception caught by animation library ===================================================== The following assertion was thrown while notifying listeners for AnimationController: EasyRefreshPhysics.applyBoundaryConditions returned invalid overscroll value.

The method was called to consider a change from 429.5809482932091 to 415.98749604902747, which is a delta of -13.6 units. However, it returned an overscroll of 25.0 units, which has a greater magnitude than the delta. The applyBoundaryConditions method is only supposed to reduce the possible range of movement, not increase it. The scroll extents are 0.0 .. 391.0, and the viewport dimension is 651.0. When the exception was thrown, this was the stack:

0 ScrollPosition.applyBoundaryConditions. (package:flutter/src/widgets/scroll_position.dart:481:9)

1 ScrollPosition.applyBoundaryConditions (package:flutter/src/widgets/scroll_position.dart:493:6)

2 ScrollPosition.setPixels (package:flutter/src/widgets/scroll_position.dart:262:33)

3 ScrollPositionWithSingleContext.setPixels (package:flutter/src/widgets/scroll_position_with_single_context.dart:82:18)

4 BallisticScrollActivity.applyMoveTo (package:flutter/src/widgets/scroll_activity.dart:566:21)

5 BallisticScrollActivity._tick (package:flutter/src/widgets/scroll_activity.dart:553:10)

6 AnimationLocalListenersMixin.notifyListeners (package:flutter/src/animation/listener_helpers.dart:155:19)

7 AnimationController._tick (package:flutter/src/animation/animation_controller.dart:830:5)

8 Ticker._tick (package:flutter/src/scheduler/ticker.dart:238:12)

9 SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1146:15)

10 SchedulerBinding.handleBeginFrame. (package:flutter/src/scheduler/binding.dart:1059:11)

11 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:614:13)

12 SchedulerBinding.handleBeginFrame (package:flutter/src/scheduler/binding.dart:1057:17)

13 SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:976:5)

17 _invoke1 (dart:ui/hooks.dart:170:10)

18 PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:286:5)

19 _beginFrame (dart:ui/hooks.dart:104:31)

(elided 3 frames from dart:async) The AnimationController notifying listeners was: AnimationController#44335(▶ 415.987; for BallisticScrollActivity)

WangDan1989 commented 1 year ago

newest also have

xuelongqy commented 1 year ago

Can you provide a reproducible code snippet?