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(), FTooltipStyle style(FTooltipStyle style)?, AlignmentGeometry tipAnchor = .bottomCenter, AlignmentGeometry childAnchor = .topCenter, FPortalSpacing spacing = const .spacing(4), FPortalOverflow overflow = .flip, bool hover = true, Duration hoverEnterDuration = const Duration(milliseconds: 500), Duration hoverExitDuration = .zero, bool longPress = true, Duration longPressExitDuration = const Duration(milliseconds: 1500), ValueWidgetBuilder<FTooltipController> builder = _builder, Widget? child, Key? key})
Creates a tooltip.
const

Properties

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 true.
final
hoverEnterDuration Duration
The duration to wait before showing the tooltip after the user hovers over the target. Defaults to 0.5 seconds.
final
hoverExitDuration Duration
The duration to wait before hiding the tooltip after the user has stopped hovering over the target. Defaults to 0.
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. Defaults to true.
final
longPressExitDuration Duration
The duration to wait before hiding the tooltip after the user has stopped pressing the target. Defaults to 1.5 seconds.
final
overflow FPortalOverflow
The callback used to shift a tooltip's tip when it overflows out of the viewport.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing FPortalSpacing
The spacing between the tipAnchor and childAnchor.
final
style FTooltipStyle Function(FTooltipStyle style)?
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

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