showcase_tutorial 1.10.0
showcase_tutorial: ^1.10.0 copied to clipboard
A Flutter package to Showcase/Highlight widgets step by step.
Changelog #
1.10.0 #
- FEAT: conditional / branching tours — a new
ShowCaseWidget.onResolveNextStepcallback lets a step decide the next step at runtime, so a tour can skip ahead or branch based on app state (e.g. "if the user already has items, jump to the checkout step"). It's consulted on every forward path (the Next button, a tap, the barrier, the keyboard, auto-play, andnext()); return theGlobalKeyof the step to jump to, ornullto advance normally. Backward and forward jumps are both allowed, and a branch is treated as an explicit jump (likegoTo).previous(),goTo(), andgoToKey()are unaffected. Additive and backward-compatible — the default isnull(no branching).
1.9.0 #
- FEAT: numeric progress indicator —
ShowCaseWidget.progressStylechooses how the built-in step indicator looks whenshowProgressis on:ShowcaseProgressStyle.dots(one dot per step, the existing default) orShowcaseProgressStyle.numeric(a compact1/6counter, handy for long tours). Additive and backward-compatible — the default is unchanged.
1.8.0 #
- FEAT: tooltip & highlight styling — finer visual control for the default
tooltip without a custom
container. New per-Showcaseoptions (each also settable tour-wide viaShowcaseStyle):arrowColor,arrowWidth,arrowHeightfor the tooltip arrow, andhighlightBorderColor/highlightBorderWidthto draw a colored border around the highlighted target. All additive and opt-in; the border follows the highlight shape and works alongsidehighlightExactShape. (Per-step overlay color is already supported viaShowcase.overlayColor.)
1.7.0 #
- FEAT: pulsing highlight ring — opt in per step with
Showcase(enablePulseAnimation: true)to draw an animated ring that pings outward around the highlight, drawing the eye to the target. Tune it withpulseColor(also settable tour-wide viaShowcaseStyle.pulseColor) andpulseDuration. Additive and off by default; the ring follows the highlight shape, works alongsidehighlightExactShape, and falls back to a single static ring when the platform "reduce motion" setting is on.
1.6.2 #
- DOCS: full dartdoc coverage of the public API — every exported class, field,
enum value, and method now has a
///comment — plus a fix for a few stale doc references. Improves the pub.dev documentation score and the docs tab. - DOCS: add an "Upgrading (1.4 → 1.6)" section to the README summarising what landed across those releases and how to opt in (all additive, no code changes).
- DOCS: tidy the README markdown-lint warnings (aligned the property-table pipes and fixed the ordered-list prefix in the Installing section).
- CHORE: losslessly optimise the preview GIFs with
gifsicle -O3—demo.gif4.6 MB → 0.4 MB andshowcase_tutorial.gif2.6 MB → 0.5 MB (pixel-identical) — and shipdemo.gifas a second pub.dev screenshot. - CHORE: add a
.pubignorethat excludes the example app's native scaffolding, the maintainer publish script, and internal docs from the published archive, dropping the package download from ~7 MB to ~0.9 MB.
1.6.1 #
- DOCS: fix the README preview GIFs.
1.6.0 #
- FEAT: built-in progress indicator and skip button in the default
tooltip, via
ShowCaseWidget.showProgressandShowCaseWidget.showSkip(label customizable withskipButtonText). The progress shows one dot per step with the active step highlighted; the skip button dismisses the whole tour. Both default tofalseand only affect the default tooltip — customcontainertooltips are untouched.
1.5.1 #
- DOCS: add a second example page ("Feature demos"), reachable from a button on
the original mail demo, that walks through the newer features (left/right
tooltip positions, progress indicator, multi-widget highlight, custom action
text,
highlightExactShape,onShow/onDismiss,barrierInteraction, auto-skip). Add a feature-walkthrough GIF to the README preview and complete the README's feature list. No library changes.
1.5.0 #
- FEAT: keyboard navigation (
ShowCaseWidget.enableKeyboardNavigation, defaulttrue) — drive the active step with a hardware keyboard:Escdismisses,→/↓/Entergo to the next step,←/↑go back. Focus-scoped, so it only acts while the overlay holds focus (never hijacks app-wide keys). Relevant on web/desktop, harmless on mobile. - FEAT: screen-reader announcements (
ShowCaseWidget.enableAutoAnnouncements, defaulttrue) — each step's title and description are announced to TalkBack/VoiceOver as it becomes active.Showcase.semanticLabeloverrides the announced text (useful for custom-containertooltips). - FIX:
Showcase.onShow/onDismiss(added in 1.4.0) could throw "setState() called during build" when the callback calledsetState(e.g. to update a "Step x of y" indicator), which cascaded into "GlobalKey used multiple times" errors. The callbacks are now dispatched after the frame.
1.4.0 #
- FEAT:
TooltipPosition.leftand.right— place the default tooltip to the side of the target, with a horizontal arrow. - FEAT: progress + navigation API on
ShowCaseWidget.of(context):currentIndex,totalSteps,isShowcaseRunning,goTo(index)andgoToKey(key)(build "Step 2 of 5" indicators and skip-to controls). - FEAT:
ShowCaseWidget.autoSkipUnmountedSteps— skip steps whose target widget isn't currently in the tree instead of showing an empty overlay. - FEAT: RTL support — the tooltip inherits the app's text direction and measures/lays out RTL text correctly.
- FEAT:
Showcase.highlightExactShape— highlight the target by its actual painted shape (a star, a pill, an icon, an irregular logo) instead of a geometrictargetShapeBorder. The target is captured as a snapshot and drawn above the dimmed overlay, so any shape is hugged exactly with no need to settargetShapeBorder/targetBorderRadiusto match it. - FEAT: per-step lifecycle callbacks
Showcase.onShowandShowcase.onDismiss— fired when a step becomes the active showcase and when it stops being active (advanced past, navigated away, or the tour is dismissed). Handy for analytics. - FEAT:
ShowCaseWidget.barrierInteraction(BarrierInteraction.next/.dismiss/.none) — choose whether tapping the dimmed background advances to the next step (default), dismisses the whole tour, or does nothing. The legacydisableBarrierInteraction: truestill works and maps to.none.
1.3.0 #
- FEAT: "show once" support for onboarding tours.
ShowCaseWidgetgains ashowcaseIdand anonShouldStartShowcaseguard (sync or async).startShowCaseconsults the guard and starts only when it returnstrue, so a tour can be shown a single time. PassstartShowCase(..., force: true)to replay (e.g. a "show tutorial again" button). The package stays storage-agnostic — persist completion yourself inonFinish.
1.2.1 #
- DOCS: rewrite the README with a Features overview and runnable examples for
every feature (custom tooltips, action buttons, multi-widget steps,
ShowcaseStyle, auto-play, programmatic control, target interactions, blur, tooltip position, enable/disable). Correct the property tables and remove the stale pre-1.0.0 migration guide.
1.2.0 #
- FEAT: add
ShowCaseWidget(style: ShowcaseStyle(...))to set default tooltip styling (tooltipBackgroundColor,textColor,titleTextStyle,descTextStyle,tooltipBorderRadius) once for everyShowcasein the tree. An individualShowcasestill overrides any value it sets. - FEAT:
Showcase.descriptionis now optional. A showcase can show just a title (or a customcontainer) without passingdescription: null. - BREAKING (minor):
Showcase.tooltipBackgroundColorandShowcase.textColorare now nullable (Color?) so they can fall back toShowcaseStyle. Code that passes these as named arguments is unaffected; only code that read the fields expecting a non-nullColorneeds a null check. - FIX: the overlay barrier was being painted twice, so the default
(non-blurred) overlay rendered at roughly double the configured opacity.
It is now drawn once at the requested
overlayColor/overlayOpacity. - FIX:
ActionsSettings.containerColoris now honoured for tooltip action buttons. Previously the action container used a hardcoded background (Colors.white/Colors.lightBlueAccent) and ignored the setting. - FIX: guard
GetPosition.getRect()against a null/unsized render object so it returnsRect.zeroinstead of throwing during teardown. - FIX: multi-widget showcases (
Showcase(keys: ...)) now skip an individual missing/unmounted widget instead of dropping every highlight for the step. - PERF:
MeasureSizenow reads its size during layout via aRenderProxyBoxinstead of scheduling a post-frame measurement on every build, and the overlay no longer schedules a rebuild callback while no showcase is active. - DOCS: document the multi-widget
keysparameter. - CHORE: correct the
flutterSDK constraint (>=3.27.0, required byColor.withValues) and addtopicsandscreenshotsto the pubspec.
1.1.2 #
- FIX: guard
_scrollIntoViewagainst a use-after-dispose crash. AShowcasedisposed within a frame of its first build (for example, a redirect right after the first build) no longer throws "Null check operator used on a null value" from its post-frame callback. - CHORE: upgrade
flutter_lintsto^6.0.0and resolve the newly surfaced lints.
1.1.1 #
- Example app: add an
isImportantfield to the mail model and refine theMailTileand detail screen styling. - Docs: fix the GitHub stars link in the README.
1.1.0 #
- FEAT: update dependency constraints to Dart SDK 3.9.0.
- Refactor the code structure for improved readability and maintainability.
- Fix minor bugs and improve performance.
- Update the documentation for new features.
1.0.4 #
- Update Flutter to 3.16.0.
1.0.0 #
- Initial release (14 Sep 2023).