JustTheInterface class abstract
A widget to display a tooltip over target widget. The tooltip can be displayed on any axis of the widget and fallback to the opposite axis if the tooltip does cannot fit its content. The tooltip can will be dismissed by waiting a specified time or again tapping on the target widger or anywhere on the screen.
Keep in mind there are different behaviours for the tooltip when isModal is set to true. The effect is to mimic the behavior of a traditional modal that is only closed by tapping on the target widget or outside the screen.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- JustTheInterface
Constructors
- JustTheInterface({Key? key})
-
const
Properties
- animatedTransitionBuilder → AnimatedTransitionBuilder
-
A customizable builder that can be used to define the transition the
tooltip uses when animating into view
no setter
- backgroundColor → Color?
-
The background color of the tooltip. This includes the tail.
no setter
- barrierDismissible → bool
-
The option to hide the tooltip.
no setter
- borderRadius → BorderRadiusGeometry
-
The border radius of the tooltip
no setter
- child → Widget
-
The child widget the tooltip will hover over. This widget does not need
any event handling logic as it will be wrapped necessary handlers.
no setter
- content → Widget
-
The content of the tooltip. Content must be collapsed so it does not
exceed it's constraints. The content's intrinsic
size
is used to first to get the quadrant of the tooltip. It is then layed out with those quadrant constraints limiting its size.no setter - controller → JustTheController?
-
Imperitive controller for handling the state the interface is in. If one
is not provided a controller will be made.
no setter
- curve → Curve
-
The curve of the fade animation.
no setter
- elevation → double
-
The elevation of the tooltip. This is not directly used in any
material elevation property but rather translated to a canvas shadow.
no setter
- enableFeedback → bool?
-
Whether the tooltip should provide acoustic and/or haptic feedback.
no setter
- fadeInDuration → Duration
-
The amount of time the tooltip takes to fade into view after a hover in or
tap event respective of
isModal
.no setter - fadeOutDuration → Duration
-
The amount of time the tooltip takes to fade out of view after a hover out
or a tapping of a skrim respective of
isModal
.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hoverShowDuration → Duration?
-
The amount of time before the tooltip is shown in the hover state.
no setter
- isModal → bool
-
If true, once the tooltip is opened, it will not close after a set
duration. It will instead instead stay on the screen until either the
scrim
is clicked or it is forcibly closedno setter - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsetsGeometry
-
The margin the tooltip keeps around edges of its box constraints.
no setter
- offset → double
-
The vertical or horizontal offset from the base of the content to the
tip of the tail of the tooltip.
no setter
- onDismiss → VoidCallback?
-
Called when the tooltip is dismissed either by waiting the specified
duration
or by tapping on the scrim.no setter - onShow → VoidCallback?
-
Called when the tooltip is shown.
no setter
- preferredDirection → AxisDirection
-
An axis that you want to place the tooltip along. Note that if there
is not enough space on that axis, the layout algorithm might decide to
place it along the opposite axis. If not enough space exists on both
sides, a constraints error will be thrown.
no setter
- reverseCurve → Curve
-
The reverse curve of the fade animation.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
If passed, this will no longer bound the tooltip to the immediate
viewport but to the space allotted by the ScrollView it is in. For
example, if the tooltip happens to go beyond its quadrant but there is
scroll space beneath it the bounds will accomadate it.
no setter
- shadow → Shadow?
-
A custom shadow that can be used to add behind the tooltip
no setter
- showDuration → Duration?
-
The length of time that the tooltip will be shown after a long press
is released or mouse pointer exits the widget.
no setter
- showWhenUnlinked → bool
-
When the target of the tooltip, the child, goes out of the viewport
whether the content dissapears along with it is determined by this
property.
no setter
- tailBaseWidth → double
-
The base length of the tooltip on the edge of the tooltip
no setter
- tailBuilder → TailBuilder
-
Defines how the path of the tail is built. The two options currently
provided are the static methods defaultTailBuilder and
defaultBezierTailBuilder, but you may just as easily provide your own.
no setter
- tailLength → double
-
The length of the tail or the amount of space from the tooltip
target + offset to the nearest edge of the tooltip.
no setter
- textDirection → TextDirection
-
The text direction that will
resolve
the content of the tooltip.no setter - triggerMode → TooltipTriggerMode?
-
The TooltipTriggerMode that will show the tooltip.
no setter
- waitDuration → Duration?
-
The length of time that a pointer must hover over a tooltip's widget
before the tooltip will be shown.
no setter
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
Creates the mutable state for this widget at a given location in the tree.
inherited
-
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
Static Methods
-
defaultAnimatedTransitionBuilder(
BuildContext context, Animation< double> animation, Widget? child) → SingleChildRenderObjectWidget -
defaultBezierTailBuilder(
Offset tip, Offset point2, Offset point3) → Path - Draws a bezier closed triangle path for the tail.
-
defaultTailBuilder(
Offset tip, Offset point2, Offset point3) → Path - Draws a linear closed triangle path for the tail.