HintController class

The single public point for controlling a tour.

Owns the machine, registry, timer and (optionally) the overlay. State is published as a ValueListenable — the vanilla Flutter default without any state-management dependency; adapters build on this same contract. No contexts/singletons are stored — the ValueNotifier state survives hot-reload and an open overlay is not reset (hot-reload friendly by construction).

Implemented types

Constructors

HintController({HintTargetRegistry? registry, HintDiagnosticsHandler? diagnostics, HintOverlayHost overlayHostBuilder(HintController)?, String? scopePrefix})
registry defaults to the default singleton (zero-config). diagnostics defaults to DebugPrintDiagnostics, but only in debug builds: in release the diagnostics cost is zero, reasons go to the callback if the user supplies a handler. overlayHostBuilder is a lazy factory for the render mechanics and receives the controller itself (the engine needs the input back-channel: next/skip/finish); null = headless.

Properties

currentState HintState
no setter
hashCode int
The hash code for this object.
no setterinherited
isIdle bool
No tour is running.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scopePrefix String?
Scope: which registry ids belong to this controller's screen.
final
state ValueListenable<HintState>
Observable tour state.
no setter

Methods

dispose() → void
Idempotent — a second dispose is a no-op (used in-body and via addTearDown).
finish() → void
Finish the tour normally.
override
goTo(int index) → void
Jump to a specific step (0-based).
inScope(String id) bool
True when id belongs to this controller's scope.
next() → void
Move to the next step (finishes the tour on the last one).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
previous() → void
Go one step back. A no-op on the first step (and for custom tooltips that do not want a back action — the default is safe).
override
restart(HintTour tour) Future<void>
Replace the running tour with tour: finishes the current one silently (normal completion — no skip diagnostics) and starts the new tour. When idle, equivalent to start.
showHint(HintStep step) Future<void>
Fast path for a single hint: a one-step tour without HintTour ceremony.
skip() → void
Abort the tour (the user chose to skip).
override
start(HintTour tour) Future<void>
Start a tour: typo validation → machine → seeding of already-mounted targets. The wait-for-target timer is armed by a machine effect.
toString() String
A string representation of this object.
inherited
tryShowHint(HintStep step) Future<bool>
showHint unless a tour is already running (false when busy).
tryStart(HintTour tour) Future<bool>
Start a tour unless one is already running: false when busy (no assert, no state change), otherwise starts and returns true.

Operators

operator ==(Object other) bool
The equality operator.
inherited