opt ios fab anim

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-22 17:57:46 +08:00
parent 0164e32b70
commit c39daf023e
2 changed files with 7 additions and 5 deletions

View File

@@ -1,16 +1,18 @@
diff --git a/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart b/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart
index 96d77f67008..533fa0eecaf 100644
index 96d77f67008..85e42540728 100644
--- a/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart
+++ b/packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart
@@ -127,8 +127,10 @@ class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollAc
@@ -127,8 +127,12 @@ class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollAc
@override
void applyUserOffset(double delta) {
- updateUserScrollDirection(delta > 0.0 ? ScrollDirection.forward : ScrollDirection.reverse);
- setPixels(pixels - physics.applyPhysicsToUserOffset(this, delta));
+ final newPixels = pixels - physics.applyPhysicsToUserOffset(this, delta);
+ if (newPixels != setPixels(newPixels) || _userScrollDirection == ScrollDirection.idle) {
+ updateUserScrollDirection(delta > 0.0 ? ScrollDirection.forward : ScrollDirection.reverse);
+ if (_userScrollDirection == ScrollDirection.idle || (newPixels != setPixels(newPixels) && newPixels >= 0)) {
+ updateUserScrollDirection(
+ delta > 0.0 ? ScrollDirection.forward : ScrollDirection.reverse,
+ );
+ }
}

View File

@@ -477,7 +477,7 @@ packages:
description:
path: "."
ref: dev
resolved-ref: de88c222852c33b3203b868794ac45734c8bcec2
resolved-ref: "6f7e69c7930428f15edb1e9dc3213d220b867976"
url: "https://github.com/bggRGjQaUbCoE/extended_nested_scroll_view.git"
source: git
version: "6.2.1"