FloatingProps class
Unified floating component properties.
Combines features from Tooltip, Popover, and Hovercard into a single flexible component that can render floating content in various ways.
Constructors
- FloatingProps({required Widget trigger, Widget? content, String? textContent, bool? isOpen, FloatingTrigger triggerType = FloatingTrigger.hover, FloatingPosition position = FloatingPosition.top, void onOpenChange(bool isOpen)?, void onToggle()?, void onMouseEnter()?, void onMouseLeave()?, bool showArrow = true, int offset = 8, int openDelay = 0, int closeDelay = 0, double? maxWidth, bool closeOnOutsideClick = true, bool closeOnEscape = true})
-
const
Properties
- closeDelay → int
-
Delay before hiding (in milliseconds). 0 for immediate.
final
- closeOnEscape → bool
-
Whether pressing Escape should close the floating content.
final
- closeOnOutsideClick → bool
-
Whether clicking outside should close the floating content.
final
- content → Widget?
-
The floating content to display. Use for rich content.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool?
-
Current open state. Null for internal state management.
final
- isTextTooltip → bool
-
Whether this is a simple text tooltip (no component content).
no setter
- maxWidth → double?
-
Maximum width for content (especially for text tooltips).
final
- offset → int
-
Distance from trigger in pixels.
final
- onMouseEnter → void Function()?
-
Called when mouse enters (for hover mode).
final
- onMouseLeave → void Function()?
-
Called when mouse leaves (for hover mode).
final
- onOpenChange → void Function(bool isOpen)?
-
Callback when open state changes.
final
- onToggle → void Function()?
-
Called when toggle is triggered (for click mode).
final
- openDelay → int
-
Delay before showing (in milliseconds). 0 for immediate.
final
- position → FloatingPosition
-
Position relative to trigger.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showArrow → bool
-
Whether to show an arrow pointing to trigger.
final
- textContent → String?
-
Simple text content (for tooltip mode). Mutually exclusive with content.
final
- trigger → Widget
-
The trigger element that activates the floating content.
final
- triggerType → FloatingTrigger
-
How to trigger the floating content.
final
Methods
-
copyWith(
{Widget? trigger, Widget? content, String? textContent, bool? isOpen, FloatingTrigger? triggerType, FloatingPosition? position, void onOpenChange(bool isOpen)?, void onToggle()?, void onMouseEnter()?, void onMouseLeave()?, bool? showArrow, int? offset, int? openDelay, int? closeDelay, double? maxWidth, bool? closeOnOutsideClick, bool? closeOnEscape}) → FloatingProps -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited