From 204715266fe59fb51dd44f09c47856f3c102e907 Mon Sep 17 00:00:00 2001 From: dom Date: Fri, 3 Jul 2026 18:40:48 +0800 Subject: [PATCH] remove FAB hero Signed-off-by: dom --- lib/scripts/fab.patch | 17 +++++++++++++++++ lib/scripts/patch.ps1 | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 lib/scripts/fab.patch diff --git a/lib/scripts/fab.patch b/lib/scripts/fab.patch new file mode 100644 index 000000000..0b14519a0 --- /dev/null +++ b/lib/scripts/fab.patch @@ -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); + } diff --git a/lib/scripts/patch.ps1 b/lib/scripts/patch.ps1 index 268dcad18..7bd0182bf 100644 --- a/lib/scripts/patch.ps1 +++ b/lib/scripts/patch.ps1 @@ -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" {