PlinthHoverCard class
A hover-triggered anchored panel matching Mantine's HoverCard.
Structurally similar to PlinthPopover (same
CompositedTransformTarget/CompositedTransformFollower +
OverlayEntry approach), but not built by composing it directly —
Popover's trigger is hardcoded to tap, which doesn't fit hover
semantics, and a hover card additionally needs to stay open while
the pointer travels from target onto content itself, which
Popover has no mechanism for. closeDelay is the grace period
after the pointer leaves both regions before the card actually
closes, so that travel doesn't cause a flicker.
Desktop/web-oriented — touch devices have no hover concept, so this control is effectively inert there (see PlinthPopover for a tap-triggered equivalent that works everywhere).
PlinthHoverCard(
target: PlinthAnchor('Hover for details', onTap: () {}),
content: const Text('Extra context shown on hover.'),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PlinthHoverCard
Constructors
- PlinthHoverCard({Key? key, required Widget target, required Widget content, PlinthPopoverPosition position = PlinthPopoverPosition.bottom, double? width, PlinthSize? radius, Duration? closeDelay})
-
const
Properties
- closeDelay → Duration?
-
Null takes the value from the theme, which is what almost every
caller wants. It cannot be a default here: a default must be
constand a theme lookup is not.final - content → Widget
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- position → PlinthPopoverPosition
-
final
- radius → PlinthSize?
-
Overrides the theme's default radius for this one instance.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → Widget
-
final
- width → double?
-
Fixed content width. Omit to size to content.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PlinthHoverCard> -
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