DVKioskRuntime class

The kiosk state machine.

Constructors

DVKioskRuntime(DVKioskPolicy policy, {Future<String?> readSecret(String name)?, DateTime clock()?, Future<void> clear(Set<DVKioskClearable> what)?, Duration tickEvery = const Duration(seconds: 1), DVLifecycleRegistry? lifecycle})

Properties

countdown → DVKioskSignal<Duration?>
Time left before the idle action, while the warning is showing; null otherwise. Drive the countdown route from this.
final
dimmed → DVKioskSignal<bool>
Whether the surface is darkened for burn-in, per dartvel.kiosk.display.screenDim.
final
hashCode → int
The hash code for this object.
no setterinherited
isLockedOut → bool
Whether a lockout is still running.
no setter
lifecycle → DVLifecycleRegistry?
Where DV.lifecycle.kiosk lives, when the application wired one: every state this runtime enters is mirrored there, so pages observe the kiosk the way they observe the app.
final
policy → DVKioskPolicy
final
resets → Stream<DVKioskReset>
Every reset, idle or explicit, as it happens: what was cleared and where to go. The app navigates to DVKioskReset.home on each.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → DVKioskSignal<DVKioskState>
Observed, never assigned from outside.
final
tickEvery → Duration
How often the idle clock is checked while active.
final

Methods

exit(DVKioskExitRequest request) → Future<DVKioskExitResult>
Attempts to leave kiosk mode.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset(DVKioskResetReason reason) → Future<DVKioskReset>
Resets the session now: clears what the policy says, tells the app to go home, and starts the clock again. A clear that fails leaves the kiosk DVKioskState.failed and rethrows -- a half-cleared session presented as fresh is the one outcome worse than a visible failure.
resetSession({required DVKioskResetReason reason}) → Future<DVKioskReset>
Clears the session and returns to home.
resume() → Future<void>
Enters kiosk mode, or returns to it from staff mode.
stop() → void
Stops the idle clock. Call when the kiosk runtime is torn down.
tick() → Future<void>
Checks the idle clock once. The periodic timer calls this; a test can.
toString() → String
A string representation of this object.
inherited
touch() → void
Records that someone is here. Call on every pointer, key or touch.

Operators

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