MagicStarterOnboarding class
A generic one-time gate for a first-run onboarding step.
A host app never blocks the user with a mandatory onboarding screen; a
step (locale confirmation, a feature tour, a welcome banner) is shown once
per device and then never again. MagicStarterOnboarding tracks that in
Vault (secure storage) and mirrors every loaded step into an in-memory
map so a widget's synchronous build can read isCompleted without
awaiting Vault.
A step is loaded once at boot (load) with the full set of step names the
host app cares about, then flipped by whichever screen resolves it
(markCompleted). Each step persists under its own Vault key
(onboarding_<step>_done), so steps are independent and a host app can
add a new one without touching the others.
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isCompleted(
String step) → bool -
Whether
stephas already been resolved on this device. -
load(
Iterable< String> steps) → Future<void> -
Loads the persisted flag for every name in
stepsfromVaultinto memory. -
markCompleted(
String step) → Future< void> -
Marks
stepas resolved for this device. -
resetForTesting(
) → void - Resets the in-memory flags between tests.
-
vaultKeyFor(
String step) → String -
The
Vaultkey asteppersists its "seen" flag under.