TooltipThemeData class

Defines the visual properties of Tooltip widgets, a tooltip theme.

Each property of TooltipThemeData corresponds to a property of Tooltip, and describes the value to use when the Tooltip property is not given an explicit non-null value.

Use this class to configure a TooltipTheme widget, or to set the ThemeData.tooltipTheme for a Theme widget or MaterialApp.theme.

To obtain the current ambient tooltip theme, use TooltipTheme.of.

See also:

Mixed in types
Annotations

Constructors

TooltipThemeData({double? height, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, double? verticalOffset, bool? preferBelow, bool? excludeFromSemantics, Decoration? decoration, TextStyle? textStyle, TextAlign? textAlign, Duration? waitDuration, Duration? showDuration, Duration? exitDuration, TooltipTriggerMode? triggerMode, bool? enableFeedback})
Creates the set of properties used to configure Tooltips.
const

Properties

decoration Decoration?
The Tooltip's shape and background color.
final
enableFeedback bool?
Whether the tooltip should provide acoustic and/or haptic feedback.
final
excludeFromSemantics bool?
Whether the Tooltip.message should be excluded from the semantics tree.
final
exitDuration Duration?
The length of time that a pointer must have stopped hovering over a tooltip's widget before the tooltip will be hidden.
final
hashCode int
The hash code for this object.
no setteroverride
height double?
The height of Tooltip.child.
final
margin EdgeInsetsGeometry?
If provided, the amount of empty space to surround the Tooltip.
final
padding EdgeInsetsGeometry?
If provided, the amount of space by which to inset Tooltip.child.
final
preferBelow bool?
Whether the tooltip is displayed below its widget by default.
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 once it has appeared.
final
textAlign TextAlign?
The TextAlign to use for the message of Tooltips.
final
textStyle TextStyle?
The style to use for the message of Tooltips.
final
triggerMode TooltipTriggerMode?
The TooltipTriggerMode that will show the tooltip.
final
verticalOffset double?
The vertical gap between the widget and the displayed tooltip.
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

copyWith({double? height, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? margin, double? verticalOffset, bool? preferBelow, bool? excludeFromSemantics, Decoration? decoration, TextStyle? textStyle, TextAlign? textAlign, Duration? waitDuration, Duration? showDuration, Duration? exitDuration, TooltipTriggerMode? triggerMode, bool? enableFeedback}) TooltipThemeData
Creates a copy of this object but with the given fields replaced with the new values.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(TooltipThemeData? a, TooltipThemeData? b, double t) TooltipThemeData?
Linearly interpolate between two tooltip themes.