Snapshot constructor
const
Snapshot({})
Creates a new snapshot with the given fields.
Required fields:
timestamp: The UTC timestamp when the snapshot was createdappVersion: The version string of the app (e.g., "1.2.3")schemaVersion: The version of the snapshot schema (currently 1)states: Map of state keys to their JSON-serializable state data
Optional fields:
metadata: Optional map of custom metadata. Must be JSON-serializable. Useful for tagging snapshots with bug IDs, reporter names, or other contextual information.
Implementation
const Snapshot({
required this.timestamp,
required this.appVersion,
required this.schemaVersion,
required this.states,
this.metadata,
});