ZeroTooltip class
ZeroTooltip is a widget that shows a tooltip when the widget got a gesture.
the tooltip is customizable with ZeroTooltipStyle and ZeroTooltipType
this widget created based on zero ui design system
there are 2 types of tooltip:
ZeroTooltipType.light
- the tooltip is has a light backgroundZeroColors.neutral2
and dark text [ZeroColors.neutral10
]ZeroTooltipType.dark
- the tooltip is has a dark background [ZeroColors.neutral10
] and light textZeroColors.neutral2
also there are 3 variants of tooltip:
- ZeroTooltipVariant.rectangle - the tooltip is a rectangle
- ZeroTooltipVariant.rounded - the tooltip is a circle/rounded
- ZeroTooltipVariant.custom - the tooltip is a rectangle with arrow
user can customize the position of the tooltip with ZeroTooltipPosition ZeroTooltipPosition.top - the tooltip is on the top of the widget ZeroTooltipPosition.bottom - the tooltip is on the bottom of the widget ZeroTooltipPosition.left - the tooltip is on the left of the widget ZeroTooltipPosition.right - the tooltip is on the right of the widget
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZeroTooltip
Constructors
- ZeroTooltip.new({Key? key, required Widget child, required String text, OnTooltipCreatedCallback? onCreated, ZeroTooltipPosition position = ZeroTooltipPosition.top, ZeroTooltipVariant variant = ZeroTooltipVariant.rectangle, Brightness? brightness, ZeroTooltipStyle? style})
-
const
Properties
- brightness → Brightness?
-
Identify the tooltip using a dark or light brightness.
final
- child → Widget
-
child is the widget that will show the tooltip when the user has a gesture on it
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onCreated → OnTooltipCreatedCallback?
-
onCreated is a callback that will return a function that will show the tooltip
this function for special cases that the user want to show the tooltip manually
for example, the user want to show the tooltip when the user click on a button
the user can use this function to show the tooltip
final
- position → ZeroTooltipPosition
-
position is the position of the tooltip
the default position is ZeroTooltipPosition.top
the user can change the position to ZeroTooltipPosition.bottom, ZeroTooltipPosition.left, ZeroTooltipPosition.right
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → ZeroTooltipStyle?
-
Customize the tooltip style
final
- text → String
-
text is the text that will show in the tooltip
this text is required
final
- variant → ZeroTooltipVariant
-
variant is the variant of the tooltip
the default variant is ZeroTooltipVariant.rectangle
the user can change the variant to ZeroTooltipVariant.rounded, ZeroTooltipVariant.custom
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ZeroTooltip> -
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