FTooltip constructor

const FTooltip({
  1. required Widget tipBuilder(
    1. BuildContext,
    2. FTooltipController
    ),
  2. FTooltipController? controller,
  3. FTooltipStyle style(
    1. FTooltipStyle
    )?,
  4. AlignmentGeometry tipAnchor = Alignment.bottomCenter,
  5. AlignmentGeometry childAnchor = Alignment.topCenter,
  6. FPortalSpacing spacing = const FPortalSpacing(4),
  7. Offset shift(
    1. Size,
    2. FPortalChildBox,
    3. FPortalBox
    ) = FPortalShift.flip,
  8. bool hover = true,
  9. Duration hoverEnterDuration = const Duration(milliseconds: 500),
  10. Duration hoverExitDuration = Duration.zero,
  11. bool longPress = true,
  12. Duration longPressExitDuration = const Duration(milliseconds: 1500),
  13. ValueWidgetBuilder<FTooltipController> builder = _builder,
  14. Widget? child,
  15. Key? key,
})

Creates a tooltip.

Contract

Throws AssertionError if neither builder nor child is both provided.

Implementation

const FTooltip({
  required this.tipBuilder,
  this.controller,
  this.style,
  this.tipAnchor = Alignment.bottomCenter,
  this.childAnchor = Alignment.topCenter,
  this.spacing = const FPortalSpacing(4),
  this.shift = FPortalShift.flip,
  this.hover = true,
  this.hoverEnterDuration = const Duration(milliseconds: 500),
  this.hoverExitDuration = Duration.zero,
  this.longPress = true,
  this.longPressExitDuration = const Duration(milliseconds: 1500),
  this.builder = _builder,
  this.child,
  super.key,
}) : assert(builder != _builder || child != null, 'Either builder or child must be provided.');