Revert "[Re-land] Exposed tooltip longPress (#118796)" (#119832)
This reverts commit d27880801435109432dcada4a2245193af4ae1f2.
diff --git a/packages/flutter/lib/src/material/tooltip.dart b/packages/flutter/lib/src/material/tooltip.dart
index af7aba9..12f80d6 100644
--- a/packages/flutter/lib/src/material/tooltip.dart
+++ b/packages/flutter/lib/src/material/tooltip.dart
@@ -751,7 +751,7 @@
behavior: HitTestBehavior.opaque,
onLongPress: (_triggerMode == TooltipTriggerMode.longPress) ? _handlePress : null,
onTap: (_triggerMode == TooltipTriggerMode.tap) ? _handleTap : null,
- excludeFromSemantics: _excludeFromSemantics,
+ excludeFromSemantics: true,
child: result,
);
// Only check for hovering if there is a mouse connected.
diff --git a/packages/flutter/test/material/back_button_test.dart b/packages/flutter/test/material/back_button_test.dart
index df7801f..09d9fd1 100644
--- a/packages/flutter/test/material/back_button_test.dart
+++ b/packages/flutter/test/material/back_button_test.dart
@@ -172,7 +172,6 @@
hasEnabledState: true,
isEnabled: true,
hasTapAction: true,
- hasLongPressAction: true,
isFocusable: true,
));
handle.dispose();
@@ -217,7 +216,6 @@
hasEnabledState: true,
isEnabled: true,
hasTapAction: true,
- hasLongPressAction: true,
isFocusable: true,
));
handle.dispose();
diff --git a/packages/flutter/test/material/calendar_date_picker_test.dart b/packages/flutter/test/material/calendar_date_picker_test.dart
index fe6d1eb..ac77882 100644
--- a/packages/flutter/test/material/calendar_date_picker_test.dart
+++ b/packages/flutter/test/material/calendar_date_picker_test.dart
@@ -672,7 +672,6 @@
tooltip: 'Previous month',
isButton: true,
hasTapAction: true,
- hasLongPressAction: true,
isEnabled: true,
hasEnabledState: true,
isFocusable: true,
@@ -681,7 +680,6 @@
tooltip: 'Next month',
isButton: true,
hasTapAction: true,
- hasLongPressAction: true,
isEnabled: true,
hasEnabledState: true,
isFocusable: true,
diff --git a/packages/flutter/test/material/chip_test.dart b/packages/flutter/test/material/chip_test.dart
index 164e0e4..13e27b6 100644
--- a/packages/flutter/test/material/chip_test.dart
+++ b/packages/flutter/test/material/chip_test.dart
@@ -2047,10 +2047,7 @@
children: <TestSemantics>[
TestSemantics(
tooltip: 'Delete',
- actions: <SemanticsAction>[
- SemanticsAction.tap,
- SemanticsAction.longPress
- ],
+ actions: <SemanticsAction>[SemanticsAction.tap],
textDirection: TextDirection.ltr,
flags: <SemanticsFlag>[
SemanticsFlag.isButton,
diff --git a/packages/flutter/test/material/date_picker_test.dart b/packages/flutter/test/material/date_picker_test.dart
index b6b6bce..648080c 100644
--- a/packages/flutter/test/material/date_picker_test.dart
+++ b/packages/flutter/test/material/date_picker_test.dart
@@ -833,7 +833,6 @@
tooltip: 'Switch to input',
isButton: true,
hasTapAction: true,
- hasLongPressAction: true,
isEnabled: true,
hasEnabledState: true,
isFocusable: true,
@@ -877,7 +876,6 @@
tooltip: 'Switch to calendar',
isButton: true,
hasTapAction: true,
- hasLongPressAction: true,
isEnabled: true,
hasEnabledState: true,
isFocusable: true,
diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart
index 15b4f27..3a18270 100644
--- a/packages/flutter/test/material/floating_action_button_test.dart
+++ b/packages/flutter/test/material/floating_action_button_test.dart
@@ -700,7 +700,6 @@
tooltip: 'Add Photo',
actions: <SemanticsAction>[
SemanticsAction.tap,
- SemanticsAction.longPress,
],
flags: <SemanticsFlag>[
SemanticsFlag.hasEnabledState,
diff --git a/packages/flutter/test/material/search_test.dart b/packages/flutter/test/material/search_test.dart
index a3d1c60..19f03af 100644
--- a/packages/flutter/test/material/search_test.dart
+++ b/packages/flutter/test/material/search_test.dart
@@ -620,10 +620,7 @@
SemanticsFlag.isEnabled,
SemanticsFlag.isFocusable,
],
- actions: <SemanticsAction>[
- SemanticsAction.tap,
- SemanticsAction.longPress,
- ],
+ actions: <SemanticsAction>[SemanticsAction.tap],
tooltip: 'Back',
textDirection: TextDirection.ltr,
),
diff --git a/packages/flutter/test/material/tooltip_test.dart b/packages/flutter/test/material/tooltip_test.dart
index a404421..0cef50d 100644
--- a/packages/flutter/test/material/tooltip_test.dart
+++ b/packages/flutter/test/material/tooltip_test.dart
@@ -1416,9 +1416,6 @@
id: 1,
tooltip: 'TIP',
textDirection: TextDirection.ltr,
- actions: <SemanticsAction>[
- SemanticsAction.longPress,
- ],
),
],
);
@@ -1619,9 +1616,6 @@
tooltip: 'Foo',
label: 'Bar',
textDirection: TextDirection.ltr,
- actions: <SemanticsAction>[
- SemanticsAction.longPress,
- ],
),
],
),
diff --git a/packages/flutter/test/material/tooltip_theme_test.dart b/packages/flutter/test/material/tooltip_theme_test.dart
index d26a8d3..4595bda 100644
--- a/packages/flutter/test/material/tooltip_theme_test.dart
+++ b/packages/flutter/test/material/tooltip_theme_test.dart
@@ -1075,9 +1075,6 @@
tooltip: 'Foo',
label: 'Bar',
textDirection: TextDirection.ltr,
- actions: <SemanticsAction>[
- SemanticsAction.longPress,
- ],
),
],
),
@@ -1121,9 +1118,6 @@
tooltip: 'Foo',
label: 'Bar',
textDirection: TextDirection.ltr,
- actions: <SemanticsAction>[
- SemanticsAction.longPress,
- ],
),
],
),