AuiTooltip class

A tooltip widget that shows a short informational message near its child.

Wraps Flutter's built-in Tooltip widget, so tooltips appear on long-press on mobile and on hover on web/desktop platforms.

Example:

AuiTooltip(
  message: 'Save document',
  child: IconButton(
    onPressed: () {},
    icon: const Icon(Icons.save),
  ),
)
Inheritance

Constructors

AuiTooltip({Key? key, required Widget child, required String message, TooltipPosition position = TooltipPosition.top, Color? backgroundColor, Color textColor = Colors.white, TextStyle? textStyle, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 10, vertical: 6), BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(6)), Duration waitDuration = const Duration(milliseconds: 500), Duration showDuration = const Duration(seconds: 2)})
Creates an AuiTooltip.
const

Properties

backgroundColor Color?
The background fill color of the tooltip bubble.
final
borderRadius BorderRadiusGeometry
The border radius of the tooltip bubble.
final
child Widget
The widget that triggers the tooltip on hover or long-press.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
message String
The text message displayed inside the tooltip.
final
padding EdgeInsetsGeometry
Inner padding around the message text inside the tooltip bubble.
final
position TooltipPosition
The preferred position of the tooltip relative to child.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDuration Duration
How long the tooltip remains visible after appearing.
final
textColor Color
The color of the message text.
final
textStyle TextStyle?
A custom TextStyle for the tooltip message.
final
waitDuration Duration
How long the pointer must hover before the tooltip is shown.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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
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