engine/overlay/tooltip_placement
library
Classes
-
TooltipMultiPlacementDelegate
-
Multi-content placement: the primary tooltip plus every extra slot
of a step, each placed by the shared placeTooltip core — a slot avoids
the spotlighted targets AND the already-placed tooltips, so several
tooltips around one target never overlap.
-
TooltipPlacementDelegate
-
Tooltip placement relative to its target.
Functions
-
placeTooltip({required Rect screen, required Rect hole, required TooltipPosition position, required Size size, required EdgeInsets safeArea, required List<Rect> avoid, double gap = _kGap})
→ Offset
-
Pure placement core, shared by the single and multi delegates: the offset
for a tooltip of
size around hole, picking the best fitting side from
position's order (preferred → mirrored → orthogonal; auto — by free
space) and vetoing placements that overlap avoid or leave the safe
rect.