widget_tooltip 1.4.1
widget_tooltip: ^1.4.1 copied to clipboard
Widget Tooltip is a Flutter package that provides a tooltip widget that can be used to display a tooltip on any widget
1.4.0 #
Features #
- Barrier / Backdrop: Add
TooltipBarrierconfig for semi-transparent overlay with optional gaussian blur effect. Supports touch-through areas for guided tours. - Close Button: Add
TooltipCloseButtonconfig withinside/outsidepositioning, customizable color and size. Includes accessibility support. - Shadows: Add
shadowsparameter for adding box shadows without modifyingmessageDecoration. - Decoration Builder: Add
decorationBuildercallback for fully custom tooltip decoration. - Separate Animation Durations: Add
showAnimationDurationandhideAnimationDurationfor independent show/hide animation timing. - Mouse Cursor: Add
mouseCursorparameter to customize hover cursor style. - onLongPress: Add
onLongPresscallback for tooltip content long press events.
Deprecations #
touchThroughArea,touchThroughAreaShape,touchThroughAreaCornerRadiusonWidgetTooltip— useTooltipBarrier.touchThroughAreainstead.
Improvements #
- Cache
MediaQueryresult in layout calculation to avoid redundant lookups - Consolidate dismiss mode checking logic into
_matchesDismissModehelper - Extract
_syncAnimationDurationshelper to eliminate duplication - Consolidate
_buildCombinedTooltipswitch branches into unified structure - Barrier fades in/out with the tooltip animation
1.3.1 #
Bug Fixes #
- Semantics hint: Fix tap trigger mode incorrectly showing "Double tap to show tooltip" instead of "Tap to show tooltip"
- TooltipGroup: Fix potential concurrent modification in
dismissAll()and_dismissOthers()by iterating over a defensive copy - Triangle painter: Remove dead
strokeWidthandstrokeCapproperties that had no effect withPaintingStyle.fill
Improvements #
- Add deprecation ignore comment for
SemanticsService.announcewith migration note for Flutter 3.35+ - Fix LICENSE copyright holder
- Apply
dart formatto all files
1.3.0 #
Features #
- TooltipGroup: Add
TooltipGroupclass to ensure only one tooltip is visible at a time within a group. UseTooltipController(group: group)to link controllers. - dismissOnScroll: Add
dismissOnScrollproperty (defaulttrue) to automatically dismiss the tooltip when the nearestScrollableancestor scrolls.
Bug Fixes #
- mounted check: Add
mountedguard in post-frame callback to prevent crashes when widget is disposed between phases. - overlay cleanup: Improve overlay removal safety with dedicated
_removeOverlay()method.
Improvements #
- Code refactoring: Extract
_calculateLayoutinto smaller methods (_resolveAnchors,_resolveOffsets) for better readability. - Typed layout result: Replace anonymous record with
_TooltipLayoutclass for clarity. - Extract overlay building: Move final overlay construction to
_insertFinalOverlayand_buildCombinedTooltipmethods.
1.2.2 #
Bug Fixes #
- direction in ListView: Fix
directionparameter being ignored insideListViewand other scrollable widgets (#7) - tooltip positioning: Fix tooltip appearing near screen center instead of target due to incorrect measurement constraints
- scale animation: Fix scale animation not working — now triangle and message box animate as a unified element
Improvements #
- Two-phase positioning: Restore proven measure-then-position approach for reliable tooltip placement
- Combined tooltip element: Triangle and message box are now a single composite widget, ensuring consistent animation behavior
- ListView example: Add ListView tab to example app for testing scroll scenarios
1.2.1 #
Improvements #
- Unified tooltip widget: Merge triangle and message box into a single widget for smoother animations
- Better scale animation: Scale animation now expands from a single center point instead of separately
- Code simplification: Remove
triangleOffsetcalculation andkTriangleOverlapOffsetconstant
1.2.0 #
Features #
- autoFlip: Add
autoFlipproperty to automatically flip tooltip direction when there's not enough space at screen edges - hover: Add
WidgetTooltipTriggerMode.hoverfor Desktop/Web mouse hover support
Breaking Changes #
- messageStyle removed: Remove unused
messageStyleproperty
Deprecations #
- tapAnyWhere: Deprecate
WidgetTooltipDismissMode.tapAnyWherein favor oftapAnywhere(correct spelling)
Bug Fixes #
- autoFlip: Simplified logic - now uses screen center to determine tooltip position (target in top half → tooltip below, target in bottom half → tooltip above)
- visibility: Auto-dismiss tooltip when target scrolls off-screen
Improvements #
- Add comprehensive documentation for
TooltipControllerandWidgetTooltipclasses - Refactor internal variable names for better code readability
- Remove unused
isLeft/isRightparameters from internal_TooltipOverlaywidget - Improve example app with better styling and demonstrations
1.1.4 #
- Bug fixed: Fix right padding not working when text is long