Tours topic

A scrim, a spotlight and a sequence of steps.

A tour is the same bubble the hints use, plus a hole cut in a dim overlay and something to advance it. Wrap the app in a TourScope, mark each step with a HintTarget, and start it with Tour.of(context).start('onboarding').

Steps render through their own target's overlay, so a tour can cross routes: a step whose target is not on screen yet simply waits for it. TourStorage decides whether a finished tour stays finished after a restart.

Classes

CallbackTourStorage Tours
A TourStorage made of two closures, for when writing a class is more ceremony than the job deserves.
HintTarget Tours
Marks child as a step of a guided tour.
InMemoryTourStorage Tours
The default TourStorage: remembers completions for this session only.
SpotlightShape Tours
The shape of the hole a spotlight cuts in the scrim.
Tour Tours
Access point for the running tour.
TourController Tours
Runs a guided tour: which tour is active, which step it is on, and how it ends.
TourLabels Tours
The words on the default tour step card.
TourScope Tours
Hosts guided tours for the subtree below it.
TourScopeState Tours
The state of a TourScope: the controller, the target registry and the keyboard shortcuts.
TourStepCard Tours
The default tour step card: title, body, progress and controls.
TourStepInfo Tours
Everything a custom step card needs to render itself and drive the tour.
TourStorage Tours
Remembers which tours a user has already seen.

Enums

TourEndReason Tours
Why a tour ended.

Typedefs

TourEndCallback = void Function(String tour, TourEndReason reason) Tours
Signature for TourController.onEnd.
TourProgressBuilder = String Function(int step, int length) Tours
Signature for rendering a step counter.
TourStepBuilder = Widget Function(BuildContext context, TourStepInfo info) Tours
Signature for building a custom tour step card.
TourStepCallback = void Function(String tour, int index) Tours
Signature for TourController.onStepChanged.