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.88k stars 633 forks source link

使用ExtendedNestedScrollView,当clamping为ture时报错 #671

Closed zenganiu closed 1 year ago

zenganiu commented 1 year ago

使用ExtendedNestedScrollView,当clamping为ture时报错,'_NestedScrollMetrics' is not a subtype of type 'ScrollPosition' in type cast 在indicator_notifier文件中_resetBallistic()实现里,ExtendedNestedScrollView里的_position为_NestedScrollMetrics,不是ScrollPosition子类 if (clamping && !userOffsetNotifier.value) { // Sucks. When clamping, the position will not change after the task is completed. // Temporary solution like this, there is a better way to replace. double pixels = position.pixels; const tiny = 0.001; pixels -= tiny; (_position as ScrollPosition).jumpTo(pixels); }

xuelongqy commented 1 year ago

3.3.0+1已修复