BubbleLabelContent class
Defines the content and appearance of a bubble shown by
BubbleLabel.show().
Constructors
- BubbleLabelContent({String? id, Color? bubbleColor, Widget? child, double? backgroundOverlayLayerOpacity, double? verticalPadding, bool shouldActivateOnLongPressOnAllPlatforms = false, Offset? positionOverride, bool dismissOnBackgroundTap = false, bool shouldIgnorePointer = true, void onTapInside(TapDownDetails event)?, void onTapOutside(TapDownDetails event)?})
-
Creates a
BubbleLabelContent.
Properties
- anchorPosition → Offset
-
computed anchor position based on override or render box
no setter
- anchorSize → Size
-
Computed anchor size
no setter
- backgroundOverlayLayerOpacity → double?
-
The opacity of the background overlay layer that will darken the
content behind the bubble.
final
- bubbleColor → Color?
-
The background color to use for the bubble itself. If null, a
default color will be used by
_BubbleWidget.final - child → Widget?
-
The widget to display inside the bubble. When null the bubble
will contain an empty
Container.final - dismissOnBackgroundTap → bool
-
if true, tapping on the background overlay will dismiss the bubble.
final
- floatingVerticalPadding → double
-
Vertical padding between the child widget and the bubble (floating
offset in logical pixels).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
Create a
BubbleLabelContentto specify the widget to show inside the bubble as well as color, size, padding, and how it should behave when activated.final - onTapInside → void Function(TapDownDetails event)?
-
Optional callback invoked when a tap is detected inside the bubble.
Useful for visual feedback or analytics.
final
- onTapOutside → void Function(TapDownDetails event)?
-
Optional callback invoked when a tap is detected outside the bubble.
Called before
dismissOnBackgroundTaplogic is applied.final - positionOverride → Offset?
-
Optional explicit position override. When provided, this value will be
used as the anchor position and any
childWidgetRenderBoxwill be ignored for positioning.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldActivateOnLongPressOnAllPlatforms → bool
-
When true, the bubble will be activated on long press on all
platforms (not just mobile).
final
- shouldIgnorePointer → bool
-
When true (default), the bubble ignores pointer events, allowing
taps to pass through to widgets underneath. When false, the bubble
content can receive pointer events (e.g., buttons inside the bubble).
final
Methods
-
copyWith(
{Color? bubbleColor, double? floatingVerticalPadding, Widget? child, double? backgroundOverlayLayerOpacity, bool? shouldActiveOnLongPressOnAllPlatforms, String? id, Offset? positionOverride, bool? shouldIgnorePointer, void onTapInside(TapDownDetails event)?, void onTapOutside(TapDownDetails event)?}) → BubbleLabelContent -
Returns a copy of this
BubbleLabelContentwith the given fields replaced by new values. Any parameter that isnullwill preserve the original value from the current instance. -
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