BubbleLabel class
A simple controller API used to show and dismiss a BubbleLabel
overlay from anywhere in the application.
Use BubbleLabel.show to display a bubble and BubbleLabel.dismiss
to remove it. The controller getter exposes the current
BubbleLabelContent state so you can read or update the content
directly when needed.
No wrapper widget is required! The app just needs to use MaterialApp, CupertinoApp, or have an Overlay widget in the widget tree.
Constructors
- BubbleLabel()
-
Default constructor for
BubbleLabel.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Static Properties
-
controller
→ Injected<
BubbleLabelContent?> -
The injected state that holds the current BubbleLabelContent.
no setter
- isActive → bool
-
Returns
truewhen a bubble is currently active and visible.no setter - tapRegionGroupId → Object
-
The group ID object used by the bubble's TapRegion.
no setter
Static Methods
-
dismiss(
{bool animate = true}) → Future< void> - Dismiss the currently active bubble.
-
isActiveById(
String? id) → bool -
Returns
truewhen a bubble is currently active and visible by id. -
show(
{required BuildContext context, required BubbleLabelContent bubbleContent, bool animate = true, GlobalKey< State< ? anchorKey}) → Future<StatefulWidget> >void> -
Show a bubble overlay with the provided
bubbleContent. -
updateContent(
{Widget? child, Color? bubbleColor, double? backgroundOverlayLayerOpacity, double? floatingVerticalPadding, bool? shouldActiveOnLongPressOnAllPlatforms, Offset? positionOverride, bool? shouldIgnorePointer}) → bool - Updates the currently active bubble's content properties.