-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Use case
The current Tooltip implementation doesn't support positioning on the left or right of the child widget. I ran into this limitation while adding tooltips to destinations in my custom navigation rail.
Similar case:
https://stackoverflow.com/questions/72202530/positioning-tooltip-in-flutter
Margin is not useful because it overlays the child widget, as mentioned in the comments to the most voted answer.
Proposal
Tooltip positioning should be considered in horizontal/vertical axis with additional horizontal/vertical offset.
To achieve this result I've edited getPositionForChild in _TooltipPositionDelegate class.
The "preferRight" parameter behaves similarly to "preferBelow". Its effect may depend on the current TextDirection, but it's unclear whether this could cause confusion.