remove FAB hero

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-07-03 18:40:48 +08:00
parent f73fb0904a
commit 204715266f
2 changed files with 20 additions and 1 deletions

17
lib/scripts/fab.patch Normal file
View File

@@ -0,0 +1,17 @@
diff --git a/packages/flutter/lib/src/material/floating_action_button.dart b/packages/flutter/lib/src/material/floating_action_button.dart
index 4b78e44dab9..80ca9c9bfc2 100644
--- a/packages/flutter/lib/src/material/floating_action_button.dart
+++ b/packages/flutter/lib/src/material/floating_action_button.dart
@@ -603,9 +603,9 @@ class FloatingActionButton extends StatelessWidget {
result = Tooltip(message: tooltip, child: result);
}
- if (heroTag != null) {
- result = Hero(tag: heroTag!, child: result);
- }
+ // if (heroTag != null) {
+ // result = Hero(tag: heroTag!, child: result);
+ // }
return MergeSemantics(child: result);
}

View File

@@ -31,6 +31,8 @@ $NavigationDrawerPatch = "lib/scripts/navigation_drawer.patch"
$PopupMenuPatch = "lib/scripts/popup_menu.patch"
$FABPatch = "lib/scripts/fab.patch"
# TODO: remove
# https://github.com/flutter/flutter/issues/90223
$ModalBarrierPatch = "lib/scripts/modal_barrier.patch"
@@ -58,7 +60,7 @@ $picks = @()
$reverts = @()
$patches = @($ModalBarrierPatch, $TextSelectionPatch, $MouseCursorPatch,
$ImageAnimPatch, $LayoutBuilderPatch, $NavigationDrawerPatch,
$PopupMenuPatch)
$PopupMenuPatch, $FABPatch)
switch ($platform.ToLower()) {
"android" {