M3ETooltip class
A Material 3 Expressive tooltip.
Plain (message): hover, focus, or long-press; dismisses immediately after leaving the target by default (themable). Default placement: above.
Rich (richMessage): optional richTitle and up to two actions
(prefer text buttons such as M3EButton.text). Transient rich uses the
same triggers as plain and dismisses 1.5s after leave by default;
persistent rich shows on tap / controller only and stays until an
outside interaction. Default placement: bottom-end.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- M3ETooltip
Constructors
-
M3ETooltip({required Widget child, String? message, String? richTitle, String? richMessage, List<
Widget> actions = const <Widget>[], bool persistent = false, M3ETooltipPlacement? preferredPlacement, Duration? dismissDelay, M3ETooltipController? controller, Key? key}) -
M3ETooltip.
const
Properties
-
actions
→ List<
Widget> -
Rich action widgets (max 2). Prefer text buttons.
final
- child → Widget
-
Anchor widget.
final
- controller → M3ETooltipController?
-
Optional programmatic show/hide.
final
- dismissDelay → Duration?
-
Override for delay after leaving the target before hiding.
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?
-
Plain supporting text.
final
- persistent → bool
-
When true (rich only), show on tap/controller — not hover/focus.
final
- preferredPlacement → M3ETooltipPlacement?
-
Overrides default placement (plain: above, rich: bottom-end).
final
- richMessage → String?
-
Rich supporting text. Presence selects rich mode.
final
- richTitle → String?
-
Rich subhead (optional).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< M3ETooltip> -
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
-
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