FakeWalletSettingsStore class
An in-memory WalletSettingsStore for tests — scripted reads (parkable via readGate to pin the loading-window rules) and recorded writes (so a test proves persist-then-publish and the failed-write honesty).
- Implemented types
Constructors
- FakeWalletSettingsStore({bool? expertValue, bool? autoShieldValue})
Properties
- autoShieldValue ↔ bool?
-
getter/setter pair
- autoShieldWrites ↔ int
-
getter/setter pair
- expertValue ↔ bool?
-
The stored flags;
nullmodels unset (each read then applies its own fail-safe default: expertfalse, auto-shieldtrue).getter/setter pair - expertWrites ↔ int
-
getter/setter pair
- failReads ↔ bool
-
When true, every READ throws — the AsyncError flag state (a failed
SharedPreferences read) the retry-on-open + read-error rules guard
(both shipped unpinned because this knob was missing).
getter/setter pair
- failWrites ↔ bool
-
When true, every WRITE throws — the platform reporting a failed persist.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
readGate
↔ Completer<
void> ? -
When set, every READ parks until this completes — the disk-read window
the loading rules guard (a persisted OFF must win the race against the
first sync edge).
getter/setter pair
- reads ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
writeGate
↔ Completer<
void> ? -
When set, every WRITE parks until this completes — the persist window a
mid-write identity re-key must survive (the notifier drops a stale publish
if the store changed while the write was in flight).
getter/setter pair
Methods
-
isAutoShieldEnabled(
) → Future< bool> -
Whether auto-shield is ON.
truewhen unknown/unset (the default posture: everything shielded).override -
isExpertTransparentFunds(
) → Future< bool> -
Whether the expert "Advanced: transparent funds" gate is ON.
falsewhen unknown/unset (the gate stays closed).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAutoShieldEnabled(
{required bool enabled}) → Future< void> -
Persist the auto-shield switch. Same durability contract as
setExpertTransparentFunds.
override
-
setExpertTransparentFunds(
{required bool enabled}) → Future< void> -
Persist the expert gate. Must DURABLY persist before it resolves; a
write the platform reports as failed THROWS (never pretend it stuck).
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited