From 96328f66e9732895d56013fbdb7655aa5c76a76e Mon Sep 17 00:00:00 2001 From: chen08209 Date: Sun, 9 Feb 2025 16:50:39 +0800 Subject: [PATCH] Fix scroll physics error --- lib/common/scroll.dart | 11 ++++++++--- pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/common/scroll.dart b/lib/common/scroll.dart index d826628..13e2521 100644 --- a/lib/common/scroll.dart +++ b/lib/common/scroll.dart @@ -45,6 +45,13 @@ class ShowBarScrollBehavior extends BaseScrollBehavior { } class NextClampingScrollPhysics extends ClampingScrollPhysics { + const NextClampingScrollPhysics({super.parent}); + + @override + NextClampingScrollPhysics applyTo(ScrollPhysics? ancestor) { + return NextClampingScrollPhysics(parent: buildParent(ancestor)); + } + @override Simulation? createBallisticSimulation( ScrollMetrics position, double velocity) { @@ -115,9 +122,7 @@ class ReverseScrollPosition extends ScrollPositionWithSingleContext { super.keepScrollOffset, super.oldPosition, super.debugLabel, - }) : _initialPixels = initialPixels ?? 0; - - final double _initialPixels; + }); bool _isInit = false; diff --git a/pubspec.yaml b/pubspec.yaml index ff9eec2..b2f3c0d 100755 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: fl_clash description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free. publish_to: 'none' -version: 0.8.75+202502091 +version: 0.8.76+202502092 environment: sdk: '>=3.1.0 <4.0.0'