HintStore class abstract

Versioned-hints store: {hintKey: lastShownAppVersion}.

The "should I show" question, answered as data: a hint shows once per app version, not once ever. HintStore.markShown records the app version at which the hint was shown; HintStore.shouldShow with a minVersion (the version the hint targets — "new in 2.3.0") returns true when the hint was never shown or was last shown in a version OLDER than minVersion. A version bump re-shows the hint; a re-run in the same version does not.

The semantic of "show all tours again" is bumping the version, not wiping flags — the old resetAll()-style flag reset is replaced by {key: lastShownVersion} bookkeeping.

The interface is abstract and storage-agnostic — the engine core knows only this contract, so a server can substitute its own implementation. The zero-dependency default ships in the core (InMemoryHintStore); persistent implementations (e.g. backed by shared_preferences) live OUTSIDE the core package to keep it dependency-free — see the example app for one.

Whether/when to show is policy — it becomes the Hub layer in phase 2; on stage 1 this is the library service plus the integration pattern (shouldShow before start, markShown on exit).

Implementers

Constructors

HintStore()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Forget everything. A debug/dev tool — the production "re-show" is a version bump, but a hard clear is handy in debug builds and tests.
markShown(String key, String version) → void
Record that the hint was shown at app version.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldShow(String key, {String? minVersion}) → bool
Whether the hint should show (see class doc). minVersion — the app version the hint targets; null — "show once ever".
toString() → String
A string representation of this object.
inherited

Operators

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