FTooltip constructor

const FTooltip({
  1. required Widget tipBuilder(
    1. BuildContext context,
    2. FTooltipController controller
    ),
  2. FTooltipControl control = const .managed(),
  3. FTooltipStyle style(
    1. FTooltipStyle style
    )?,
  4. AlignmentGeometry tipAnchor = .bottomCenter,
  5. AlignmentGeometry childAnchor = .topCenter,
  6. FPortalSpacing spacing = const .spacing(4),
  7. FPortalOverflow overflow = .flip,
  8. bool hover = true,
  9. Duration hoverEnterDuration = const Duration(milliseconds: 500),
  10. Duration hoverExitDuration = .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.control = const .managed(),
  this.style,
  this.tipAnchor = .bottomCenter,
  this.childAnchor = .topCenter,
  this.spacing = const .spacing(4),
  this.overflow = .flip,
  this.hover = true,
  this.hoverEnterDuration = const Duration(milliseconds: 500),
  this.hoverExitDuration = .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.');