updateContent static method
Updates the currently active bubble's content properties.
Use this to reactively update bubble properties while it's displayed,
such as changing shouldIgnorePointer when a toggle changes.
Only updates if a bubble is currently active. Returns true if
the update was applied, false if no bubble is active.
Example:
BubbleLabel.updateContent(shouldIgnorePointer: newValue);
Implementation
static bool updateContent({
Widget? child,
Color? bubbleColor,
double? backgroundOverlayLayerOpacity,
double? floatingVerticalPadding,
bool? shouldActiveOnLongPressOnAllPlatforms,
Offset? positionOverride,
bool? shouldIgnorePointer,
}) {
if (!isActive || controller.state == null) {
return false;
}
final currentContent = controller.state!;
controller.state = currentContent.copyWith(
child: child,
bubbleColor: bubbleColor,
backgroundOverlayLayerOpacity: backgroundOverlayLayerOpacity,
floatingVerticalPadding: floatingVerticalPadding,
shouldActiveOnLongPressOnAllPlatforms:
shouldActiveOnLongPressOnAllPlatforms,
positionOverride: positionOverride,
shouldIgnorePointer: shouldIgnorePointer,
);
return true;
}