SuperTooltip class

///////////////////////////////////////////////////////////////////////////////////////////////// Super flexible Tooltip class that allows you to show any content inside a Tooltip in the overlay of the screen.

Constructors

SuperTooltip({Key? tooltipContainerKey, required Widget content, required TooltipDirection popupDirection, bool enableTitle = false, String title = "", OutSideTapHandler? onClose, double? minWidth, double? minHeight, double? maxWidth, double? maxHeight, double? top, double? right, double? bottom, double? left, double minimumOutSidePadding = 20.0, ShowCloseButton showCloseButton = ShowCloseButton.none, bool snapsFarAwayVertically = false, bool snapsFarAwayHorizontally = false, bool hasShadow = true, Color shadowColor = Colors.black54, double shadowBlurRadius = 10.0, double shadowSpreadRadius = 5.0, Offset? shadowOffset = Offset.zero, double borderWidth = 2.0, double borderRadius = 10.0, Color borderColor = Colors.black, IconData closeButtonIcon = Icons.close, Color closeButtonColor = Colors.black, double closeButtonSize = 30.0, double arrowLength = 20.0, double arrowBaseWidth = 20.0, double arrowTipDistance = 2.0, Color backgroundColor = Colors.white, Color outsideBackgroundColor = const Color.fromARGB(50, 255, 255, 255), ClipAreaShape touchThroughAreaShape = ClipAreaShape.oval, double touchThroughAreaCornerRadius = 5.0, Rect? touchThrougArea, bool dismissOnTapOutside = true, bool blockOutsidePointerEvents = true, bool containsBackgroundOverlay = true, bool automaticallyVerticalDirection = false, bool hasArrow = true})

Properties

arrowBaseWidth double
The width of the arrow at its base
final
arrowLength double
The length of the Arrow
final
arrowTipDistance double
The distance of the tip of the arrow's tip to the center of the target
final
automaticallyVerticalDirection bool
The parameter chooses popupDirection automatically by axis Y
final
backgroundColor Color
The backgroundcolor of the Tooltip
final
blockOutsidePointerEvents bool
Block pointer actions or pass them through background
final
borderColor Color
The color of the border
final
borderRadius double
The corder radii of the border
final
borderWidth double
the stroke width of the border
final
bottom double?
top, right, bottom, left position the Tooltip absolute relative to the whole screen
getter/setter pair
closeButtonColor Color
The color of the close icon
final
closeButtonIcon IconData
The icon for the close button
final
closeButtonSize double
The size of the close button
final
containsBackgroundOverlay bool
Enable background overlay
final
content Widget
The content of the Tooltip
final
dismissOnTapOutside bool
Allow the tooltip to be dismissed tapping outside
final
enableTitle bool
The parameter enable pop title
final
hasArrow bool
final
hashCode int
The hash code for this object.
no setterinherited
hasShadow bool
hasShadow defines if the tooltip should have a shadow
final
isOpen bool
Signals if the Tooltip is visible at the moment
getter/setter pair
left double?
top, right, bottom, left position the Tooltip absolute relative to the whole screen
getter/setter pair
maxHeight double?
minWidth, minHeight, maxWidth, maxHeight optional size constraints. If a constraint is not set the size will ajust to the content
getter/setter pair
maxWidth double?
minWidth, minHeight, maxWidth, maxHeight optional size constraints. If a constraint is not set the size will ajust to the content
getter/setter pair
minHeight double?
minWidth, minHeight, maxWidth, maxHeight optional size constraints. If a constraint is not set the size will ajust to the content
getter/setter pair
minimumOutSidePadding double
The minium padding from the Tooltip to the screen limits
final
minWidth double?
minWidth, minHeight, maxWidth, maxHeight optional size constraints. If a constraint is not set the size will ajust to the content
getter/setter pair
onClose OutSideTapHandler?
optional handler that gets called when the Tooltip is closed
final
outsideBackgroundColor Color
The color of the rest of the overlay surrounding the Tooltip. typically a translucent color.
final
popupDirection TooltipDirection
The direcion in which the tooltip should open
getter/setter pair
top, right, bottom, left position the Tooltip absolute relative to the whole screen
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowBlurRadius double
The shadow blur radius.
final
shadowColor Color
The shadow color.
final
shadowOffset Offset?
The shadow offset
final
shadowSpreadRadius double
The shadow spread radius.
final
showCloseButton ShowCloseButton
A Tooltip can have none, an inside or an outside close icon
final
snapsFarAwayHorizontally bool
If snapsFarAwayHorizontally== true the bigger free space left or right of the target will be covered completely by the ToolTip. All other dimension or position constraints get overwritten
final
snapsFarAwayVertically bool
If snapsFarAwayVertically== true the bigger free space above or below the target will be covered completely by the ToolTip. All other dimension or position constraints get overwritten
final
title String
The parameter show the title in the tooltip
final
tooltipContainerKey Key?
Let's you pass a key to the Tooltips cotainer for UI Testing
final
top double?
top, right, bottom, left position the Tooltip absolute relative to the whole screen
getter/setter pair
touchThrougArea Rect?
By default touching the surrounding of the Tooltip closes the tooltip. you can define a rectangle area where the background is completely transparent and the widgets below react to touch
final
touchThroughAreaCornerRadius double
If touchThroughAreaShape is ClipAreaShape.rectangle you can define a border radius
final
touchThroughAreaShape ClipAreaShape
The shape of the touchThrougArea.
final

Methods

close() → void
Removes the Tooltip from the overlay
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show(BuildContext targetContext, {OverlayState? overlay, Offset? targetCenter}) → void
Displays the tooltip The center of targetContext is used as target of the arrow
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

closeButtonKey Key
Allows to accedd the closebutton for UI Testing
getter/setter pair