Prefs class

File-backed preferences. Atomic write (temp + rename) so a crash mid-flush cannot corrupt the live file (NFR-PERSIST-001).

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
snapshot PrefsSnapshot
no setter

Methods

copyTo(String destProjectPath) Future<void>
Copy the prefs file from this project to destProjectPath. Used by Project.saveAs so the new project starts with the same UI state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save() Future<void>
Persist the current snapshot atomically. Swallows IO errors so the UI tick never blocks on prefs (NFR-PERSIST-003).
toString() String
A string representation of this object.
inherited
update(PrefsSnapshot next) → void
Replace the in-memory snapshot. Does not persist — call save.

Operators

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

Static Methods

load(String projectPath) Future<Prefs>
Load existing prefs or return defaults. Never throws on parse error — corrupt JSON is logged via warnings and replaced with defaults.