ShadTooltip class
A widget that displays a tooltip on hover or focus, styled to match the Shadcn UI design system.
Provides customizable delay, duration, animation effects, and styling.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ShadTooltip
- Available extensions
Constructors
-
ShadTooltip({Key? key, required Widget child, required WidgetBuilder builder, FocusNode? focusNode, Duration? waitDuration, Duration? showDuration, List<
Effect> ? effects, EdgeInsetsGeometry? padding, ShadDecoration? decoration, ShadAnchorBase? anchor, ShadHoverStrategies? hoverStrategies, ShadTooltipController? controller, Duration? longPressDuration, Duration? duration, Duration? reverseDuration}) -
A widget that displays a tooltip on hover or focus, styled to match the
Shadcn UI design system.
const
Properties
- anchor → ShadAnchorBase?
-
The anchor position of the tooltip relative to its child.
final
- builder → WidgetBuilder
-
The builder function that creates the tooltip content widget.
final
- child → Widget
-
The child widget that triggers the tooltip when hovered or focused.
final
- controller → ShadTooltipController?
-
The controller that manages the visibility of the ShadTooltip.
final
- decoration → ShadDecoration?
-
The decoration of the tooltip.
final
- duration → Duration?
-
The duration of the tooltip's entrance animation.
final
-
effects
→ List<
Effect> ? -
The animation effects applied to the tooltip.
final
- focusNode → FocusNode?
-
The focus node of the child widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverStrategies → ShadHoverStrategies?
-
The hover strategies to use for the tooltip on devices with touchscreens.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- longPressDuration → Duration?
-
The duration for a long press to be recognized, triggering the tooltip on
touch devices.
final
- padding → EdgeInsetsGeometry?
-
The padding of the tooltip content.
final
- reverseDuration → Duration?
-
The duration of the tooltip's exit animation.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDuration → Duration?
-
The length of time that the tooltip will be shown after a mouse pointer
exits the widget.
final
- waitDuration → Duration?
-
The length of time that a pointer must hover over a tooltip's widget
before the tooltip will be shown.
final
Methods
-
animate(
{Key? key, List< Effect> ? effects, AnimateCallback? onInit, AnimateCallback? onPlay, AnimateCallback? onComplete, bool? autoPlay, Duration? delay, AnimationController? controller, Adapter? adapter, double? target, double? value}) → Animate -
Available on Widget, provided by the AnimateWidgetExtensions extension
Wraps the target Widget in an Animate instance, and returns the instance for chaining calls. Ex.myWidget.animate()is equivalent toAnimate(child: myWidget). -
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ShadTooltip> -
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.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionedWith(
ShadPosition position) → Widget -
Available on Widget, provided by the PositionedExt extension
-
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