InstantTooltip constructor

const InstantTooltip({
  1. Key? key,
  2. required Widget child,
  3. required WidgetBuilder tooltipBuilder,
  4. HitTestBehavior behavior = HitTestBehavior.translucent,
  5. AlignmentGeometry tooltipAlignment = Alignment.bottomCenter,
  6. AlignmentGeometry? tooltipAnchorAlignment,
})

Creates an InstantTooltip.

Parameters:

  • child (Widget, required): Widget that triggers the tooltip.
  • tooltipBuilder (WidgetBuilder, required): Builder for tooltip content.
  • behavior (HitTestBehavior, default: HitTestBehavior.translucent): Hit test behavior.
  • tooltipAlignment (AlignmentGeometry, default: Alignment.bottomCenter): Tooltip position.
  • tooltipAnchorAlignment (AlignmentGeometry?, optional): Anchor point on child.

Example:

InstantTooltip(
  tooltipBuilder: (context) => Text('Help text'),
  child: Icon(Icons.help),
)

Implementation

const InstantTooltip({
  super.key,
  required this.child,
  required this.tooltipBuilder,
  this.behavior = HitTestBehavior.translucent,
  this.tooltipAlignment = Alignment.bottomCenter,
  this.tooltipAnchorAlignment,
});