SfTooltip class

Renders the tooltip widget.

This class provides options for customizing the properties of the tooltip.

Inheritance

Constructors

SfTooltip({TextStyle textStyle = const TextStyle(), int animationDuration = 500, Interval animationCurve = const Interval(0.0, 1.0), bool enable = true, double opacity = 1, Color borderColor = Colors.black, double borderWidth = 0, int duration = 3000, bool shouldAlwaysShow = false, double elevation = 0, bool canShowMarker = true, dynamic textAlignment = TooltipAlignment.near, int decimalPlaces = 2, Color color = Colors.black, Color labelColor = Colors.white, String? header, String? format, Color? shadowColor, Key? key, void onTooltipRender(TooltipRenderArgs tooltipRenderArgs)?})
Creating an argument constructor of SfTooltip class.

Properties

animationCurve Interval
Curve for animating the tooltip.
final
animationDuration int
Duration for animating the tooltip.
final
borderColor Color
Color of the tooltip border.
final
borderWidth double
Border width of the tooltip.
final
canShowMarker bool
Toggles the visibility of the marker in the tooltip.
final
color Color
Color of the tooltip.
final
decimalPlaces int
Specifies the number decimals to be displayed in tooltip text
final
duration int
Duration for displaying the tooltip.
final
elevation double
Elevation of the tooltip.
final
enable bool
Toggles the visibility of the tooltip.
final
format String?
Formats the tooltip text.
final
hashCode int
The hash code for this object.
no setterinherited
Header of the tooltip. By default, there will be no header.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelColor Color
Color of the tooltip label.
final
onTooltipRender → (void Function(TooltipRenderArgs tooltipRenderArgs)?)
Occurs while tooltip is rendered. You can customize the text, position and header. Here, you can get the text, header, x and y-positions.
final
opacity double
Opacity of the tooltip.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
Color of the tooltip shadow.
final
shouldAlwaysShow bool
Shows or hides the tooltip.
final
textAlignment → dynamic
Alignment of the text in the tooltip
final
textStyle TextStyle
Customizes the tooltip text style
final

Methods

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