opt fab anim

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-22 14:25:52 +08:00
parent be07cafb54
commit 7d4afc15d3
3 changed files with 21 additions and 2 deletions

View File

@@ -43,6 +43,8 @@ $EditableTextPatch = "lib/scripts/editable_text.patch"
$TextFieldPatch = "lib/scripts/text_field.patch" $TextFieldPatch = "lib/scripts/text_field.patch"
$ScrollPositionPatch = "lib/scripts/scroll_position.patch"
# TODO: remove # TODO: remove
# https://github.com/flutter/flutter/pull/183261 # https://github.com/flutter/flutter/pull/183261
$SelectableRegionPatch = "lib/scripts/null_safety_for_selectable_region.patch" $SelectableRegionPatch = "lib/scripts/null_safety_for_selectable_region.patch"
@@ -75,7 +77,7 @@ $reverts = @()
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch, $patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch,
$ImageAnimPatch, $LayoutBuilderPatch, $NavigationDrawerPatch, $ImageAnimPatch, $LayoutBuilderPatch, $NavigationDrawerPatch,
$PopupMenuPatch, $FABPatch, $SelectableRegionPatch, $SelectableRegionSelectionPatch, $PopupMenuPatch, $FABPatch, $SelectableRegionPatch, $SelectableRegionSelectionPatch,
$EditableTextPatch, $TextFieldPatch) $EditableTextPatch, $TextFieldPatch, $ScrollPositionPatch)
switch ($platform.ToLower()) { switch ($platform.ToLower()) {
"android" { "android" {

View File

@@ -0,0 +1,17 @@
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
--- 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
@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);
+ }
}
@override

View File

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