FTooltip class

A tooltip displays information related to a widget when focused, hovered over, or long pressed.

Note: The tooltip will not be shown when long pressed if the child contains a GestureDetector that has a long-press callback.

See:

Inheritance

Constructors

FTooltip({required Widget tipBuilder(BuildContext context, FTooltipController controller), FTooltipControl control = const .managed(), FTooltipStyleDelta style = const .context(), AlignmentGeometry tipAnchor = .bottomCenter, AlignmentGeometry childAnchor = .topCenter, FPortalSpacing spacing = const .spacing(7), FPortalOverflow overflow = .flip, FPortalArrowAlignment? arrow = .childCenter, bool? hover, bool? longPress, bool useViewPadding = true, bool useViewInsets = true, OverlayChildLocation overlayLocation = .nearestOverlay, ValueWidgetBuilder<FTooltipController> builder = defaultBuilder, Widget? child, Key? key})
Creates a tooltip.
const

Properties

arrow → FPortalArrowAlignment?
How this tooltip's arrow should be aligned to the child. Defaults to FPortalArrowAlignment.childCenter.
final
builder → ValueWidgetBuilder<FTooltipController>
An optional builder which returns the child widget that the tooltip is aligned to.
final
child → Widget?
The child to which the tip is aligned to.
final
childAnchor → AlignmentGeometry
The anchor point on the child used for positioning relative to the tipAnchor.
final
control → FTooltipControl
Defines how the tooltip's shown state is controlled.
final
hashCode → int
The hash code for this object.
no setterinherited
hover → bool?
True if the tooltip should be shown when hovered over. Defaults to FTooltipGroup.hover, typically true.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
longPress → bool?
True if the tooltip should be shown when long pressed.
final
overflow → FPortalOverflow
The callback used to shift a tooltip's tip when it overflows out of the viewport.
final
overlayLocation → OverlayChildLocation
The Overlay that the portal is attached to.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
spacing → FPortalSpacing
The spacing between the tipAnchor and childAnchor. Defaults to FPortalSpacing(7).
final
style → FTooltipStyleDelta
The tooltip's style.
final
tipAnchor → AlignmentGeometry
The anchor point on the tip used for positioning relative to the childAnchor.
final
tipBuilder → Widget Function(BuildContext context, FTooltipController controller)
The tip builder. The child passed to tipBuilder will always be null.
final
useViewInsets → bool
Whether to avoid the platform view's insets (the soft keyboard).
final
useViewPadding → bool
Whether to avoid the platform view's padding (static safe areas like the notch and status bar).
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<FTooltip>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

defaultBuilder(BuildContext _, FTooltipController _, Widget? child) → Widget
The default builder that returns the child as-is.