Remove Tooltip mouse tracker listener & update hovering/MouseRegion logic & animation (#119199)

Fixes https://github.com/flutter/flutter/issues/117627

### Behavior changes:
1. If fade in/fade out animation is already in progress, hiding/showing the tooltip will immediately take effect without waiting for `waitDuration`.
2. A PointerDownEvent that doesn't become a part of a "trigger" gesture dismisses the tooltip, even for hovered ones.
3. The OverlayEntry is now updated only when the previous tooltip was completely dismissed. This can be fixed by OverlayPortal but I'm not sure what the correct behavior is.
This commit is contained in:
LongCatIsLooong
2023-05-25 00:24:45 -07:00
committed by GitHub
parent 9da1d98ae9
commit 1b800fd496
7 changed files with 592 additions and 318 deletions

View File

@@ -20,7 +20,8 @@ void main() {
await tester.tap(find.byType(FloatingActionButton));
await tester.pump(const Duration(milliseconds: 10));
expect(find.text(tooltipText), findsOneWidget);
// Wait for the tooltip to disappear.
// Tap on the tooltip and wait for the tooltip to disappear.
await tester.tap(find.byTooltip(tooltipText));
await tester.pump(const Duration(seconds: 1));
expect(find.text(tooltipText), findsNothing);
});