MoonTooltip class

Inheritance

Constructors

MoonTooltip({Key? key, bool hasArrow = true, bool hideOnTap = true, required bool show, BorderRadiusGeometry? borderRadius, Color? backgroundColor, Color borderColor = Colors.transparent, double? arrowBaseWidth, double? arrowLength, double arrowOffsetValue = 0, double? arrowTipDistance, double borderWidth = 0, double? minHeight, double? minWidth, double? maxHeight, double? maxWidth, double tooltipMargin = 8, Duration? transitionDuration, Curve? transitionCurve, EdgeInsetsGeometry? contentPadding, List<BoxShadow>? tooltipShadows, MoonTooltipPosition tooltipPosition = MoonTooltipPosition.top, RouteObserver<PageRoute>? routeObserver, String? semanticLabel, VoidCallback? onTap, required Widget child, required Widget content})
Creates a Moon Design tooltip.
const

Properties

arrowBaseWidth double?
The base width of the tooltip arrow (tail).
final
arrowLength double?
The length of the tooltip arrow (tail).
final
arrowOffsetValue double
The offset of the tooltip arrow (tail) from the center of the tooltip.
final
arrowTipDistance double?
The distance from the tip of the tooltip arrow (tail) to the child (target).
final
backgroundColor Color?
The background color of the tooltip.
final
borderColor Color
The border color of the tooltip. Displayed when borderWidth is larger than 0.
final
borderRadius BorderRadiusGeometry?
The border radius of the tooltip.
final
borderWidth double
The width of the tooltip border.
final
child Widget
The widget to display as the child (target) of the tooltip.
final
content Widget
The widget to display inside the tooltip as its content.
final
contentPadding EdgeInsetsGeometry?
The padding of the tooltip content.
final
hasArrow bool
Whether the tooltip has an arrow (tail).
final
hashCode int
The hash code for this object.
no setterinherited
hideOnTap bool
Whether to hide (dismiss) the tooltip on tap. Defaults to true. For finer control over dismissal, use show and onTap properties.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxHeight double?
An optional size constraint for the tooltip content to define its maximum height.
final
maxWidth double?
An optional size constraint for the tooltip content to define its maximum width.
final
minHeight double?
An optional size constraint for the tooltip content to define its minimum height.
final
minWidth double?
An optional size constraint for the tooltip content to define its minimum width.
final
onTap VoidCallback?
The callback that is called when the tooltip is tapped.
final
routeObserver RouteObserver<PageRoute>?
The observer to track route changes and automatically hide the tooltip when the widget's route is not active.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
The semantic label for the tooltip.
final
show bool
Whether to show the tooltip.
final
tooltipMargin double
The margin of the tooltip. Prevents the tooltip from touching the edges of the viewport.
final
tooltipPosition MoonTooltipPosition
The tooltip position relative to the child (target). Defaults to MoonTooltipPosition.vertical.
final
tooltipShadows List<BoxShadow>?
The list of shadows applied to the tooltip.
final
transitionCurve Curve?
The curve of the tooltip transition animation (fade in or out).
final
transitionDuration Duration?
The duration of the tooltip transition animation (fade in or out).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _MoonTooltipState
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}) 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