JsonTooltipBuilderModel class

Creates a tooltip.

By default, tooltips should adhere to the Material specification. If the optional constructor parameters are not defined, the values provided by TooltipTheme.of will be used if a TooltipTheme is present or specified in ThemeData.

All parameters that are defined in the constructor will override the default values and the values in TooltipTheme.of.

Only one of message and richMessage may be non-null.

Inheritance

Constructors

JsonTooltipBuilderModel(Map<String, dynamic> args, {Decoration? decoration, bool? enableFeedback, bool enableTapToDismiss = true, bool? excludeFromSemantics, Duration? exitDuration, double? height, EdgeInsetsGeometry? margin, String? message, void onTriggered()?, EdgeInsetsGeometry? padding, bool? preferBelow, InlineSpan? richMessage, Duration? showDuration, TextAlign? textAlign, TextStyle? textStyle, TooltipTriggerMode? triggerMode, double? verticalOffset, Duration? waitDuration, JsonWidgetData? child})
const

Properties

args Map<String, dynamic>
finalinherited
child JsonWidgetData?
The widget below this widget in the tree.
final
decoration Decoration?
Specifies the tooltip's shape and background color.
final
enableFeedback bool?
Whether the tooltip should provide acoustic and/or haptic feedback.
final
enableTapToDismiss bool
Whether the tooltip can be dismissed by tap.
final
excludeFromSemantics bool?
Whether the tooltip's message or richMessage 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 setterinherited
height double?
The height of the tooltip's child.
final
margin EdgeInsetsGeometry?
The empty space that surrounds the tooltip.
final
message String?
The text to display in the tooltip.
final
onTriggered → (void Function()?)
Called when the Tooltip is triggered.
final
padding EdgeInsetsGeometry?
The amount of space by which to inset the tooltip's child.
final
preferBelow bool?
Whether the tooltip defaults to being displayed below the widget.
final
richMessage InlineSpan?
The rich text to display in the tooltip.
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 long press is released (if triggerMode is TooltipTriggerMode.longPress) or a tap is released (if triggerMode is TooltipTriggerMode.tap). This property does not affect mouse pointer devices.
final
textAlign TextAlign?
How the message of the tooltip is aligned horizontally.
final
textStyle TextStyle?
The style to use for the message of the tooltip.
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
override
toString() String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
inherited

Operators

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

Static Methods

fromDynamic(dynamic map, {Map<String, dynamic> args = const {}, JsonWidgetRegistry? registry}) JsonTooltipBuilderModel
maybeFromDynamic(dynamic map, {Map<String, dynamic> args = const {}, JsonWidgetRegistry? registry}) JsonTooltipBuilderModel?