AppSnapshot class

Represents a serializable snapshot of the app's meaningful state.

Used by SnapshotManager to persist state for crash recovery. Every field is independently validated during deserialization — a corrupt field becomes its empty default, never crashes the recovery process.

Constructors

AppSnapshot({required String snapshotId, required List<String> routeStack, required Map<String, double> scrollPositions, required Map<String, dynamic> formInputs, required Map<String, dynamic> customState, required DateTime timestamp})
const
AppSnapshot.fromJsonSafe(Map<String, dynamic> json)
Safe deserialization: every field is validated independently. A corrupt field falls back to its default — never throws.
factory

Properties

customState Map<String, dynamic>
Custom app state serialized by the developer's SnapshotSerializer.
final
formInputs Map<String, dynamic>
Form field values keyed by form ID or field name.
final
hashCode int
The hash code for this object.
no setterinherited
routeStack List<String>
The navigation stack at snapshot time (e.g. '/', '/products', '/cart').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollPositions Map<String, double>
Scroll positions by route or widget key.
final
snapshotId String
Unique identifier for this snapshot.
final
timestamp DateTime
When this snapshot was taken.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

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