FTooltip class
A tooltip displays information related to a widget when focused, hovered over and/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:
- https://forui.dev/docs/overlay/tooltip for working examples.
- FTooltipController for controlling a tooltip.
- FTooltipStyle for customizing a tooltip's appearance.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FTooltip
Constructors
-
FTooltip({required ValueWidgetBuilder<
FTooltipStyle> tipBuilder, required Widget child, FTooltipController? controller, FTooltipStyle? style, Alignment tipAnchor = Alignment.bottomCenter, Alignment childAnchor = Alignment.topCenter, Offset shift(Size, FPortalTarget, FPortalFollower) = FPortalFollowerShift.flip, bool hover = true, Duration hoverEnterDuration = const Duration(milliseconds: 500), Duration hoverExitDuration = Duration.zero, bool longPress = true, Duration longPressExitDuration = const Duration(milliseconds: 1500), Key? key}) -
Creates a tooltip.
const
Properties
- child → Widget
-
The child.
final
- childAnchor → Alignment
-
The anchor of the target to which the tipAnchor is aligned to. Defaults to Alignment.topCenter.
final
- controller → FTooltipController?
-
The tooltip's controller.
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shift → Offset Function(Size, FPortalTarget, FPortalFollower)
-
The shifting strategy used to shift a tooltip's tip when it overflows out of the viewport. Defaults to
FPortalFollowerShift.flip.
final
- style → FTooltipStyle?
-
The tooltip's style.
final
- tipAnchor → Alignment
-
The anchor of the follower to which the childAnchor is aligned to. Defaults to Alignment.bottomCenter.
final
-
tipBuilder
→ ValueWidgetBuilder<
FTooltipStyle> -
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}) → 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