bubble_label 2.0.2
bubble_label: ^2.0.2 copied to clipboard
A small Flutter package that shows a floating bubble label anchored to a child widget, and optional background overlay + simple show/dismiss animations.
2.0.2 - 2025-11-30 #
Fixes #
- Documentation: Updated README to use relative image paths so pub.flutter-io.cn renders images inline.
- Pub.dev page: Added
screenshotstopubspec.yamlso the GIF appears in the Screenshots section; addedtopicsfor discoverability.
2.0.1 #
- updated pubspec.yaml and README files
2.0.0 - 2025-11-30 #
Highlights #
- Major API update: bubble content positioning now derives from a
RenderBoxor an explicitpositionOverriderather than passing screen coordinates. This simplifies usingBubbleLabelfrom Widgets where you have aBuildContextorRenderBoxrather than having to compute positions manually. - Breaking change: removed explicit
labelWidth/labelHeightandchildWidgetPosition/childWidgetSizeparameters. The bubble now adapts to the size of thechildautomatically and useschildWidgetRenderBox/positionOverridefor anchor positioning. - Added an
idtoBubbleLabelContent(a unique Xid) so callers can distinguish multiple activations when necessary. - Added
dismissOnBackgroundTapto allow background overlay taps to dismiss the bubble easily. - Updated tests and example app to demonstrate the new API and usage patterns.
Migration notes #
- If your code used the previous
childWidgetPosition/childWidgetSizefields, switch to providing aRenderBoxusingchildWidgetRenderBox(e.g., usingcontext.findRenderObject()in aBuilder) or supply apositionOverride: Offset(x,y)to place the bubble explicitly. - Remove any code that passed
labelWidth/labelHeight— the bubble automatically sizes to thechildcontent. UseContainer,SizedBox, or other layout widgets inside thechildto control the bubble size if you need explicit dimensions. - If needed, you can still horizontally/vertically offset the bubble via the
floatingVerticalPaddingparameter inBubbleLabelContent.
Other changes #
- Small animation improvements to opening/closing and fade durations.
- Clean-up: refactored internal state handling and simplified the public API surface.
1.0.1 Documentation and test improvements (2025-11-25) #
- Added comprehensive dartdoc comments for public API elements to improve discoverability and meet pub.flutter-io.cn documentation requirements.
- Enabled the
public_member_api_docslint rule inanalysis_options.yamlto help maintain documentation coverage. - Improved README formatting and clarified usage examples; ensured the
example/app demonstrates pointer, overlay, and animation toggles. - Confirmed unit tests cover the main behaviors and updated them where required to ensure stable tests for animation timings and immediate (non-animated) dismissals.
1.0.0 Initial stable release (2025-11-24) #
- Added
BubbleLabelControllerwhich provides a global overlay for the bubble label. - Implemented
BubbleLabel.show(...)andBubbleLabel.dismiss()to control the bubble presentation and animation. - Added
BubbleLabelContentto define bubble size, color, content and the anchor position/size. - Background overlay support with configurable opacity and show/hide animations.
- Added
example/app demonstrating basic usage (tap a button to show a bubble). - Updated
example/app to demonstrate advanced usage: long-press activation, disabling overlay, animation toggles and ignoring pointer behavior. - Improved tests to cover additional behaviors: overlay opacity, ignore pointer behavior, long-press activation, and animation timing.
- Updated
example/app to include UI dismissal options (immediate & animated) and toggles to control show/dismiss behavior.example/app demonstrates basic usage. Run with:cd example && flutter run.
0.0.1 Pre-release #
- Initial release and simple proof of concept.
