ProjectStorage class
Saves editor projects as JSON in the app documents directory so drafts survive restarts.
Media that lives in a temporary/cache directory (picker copies, AI renders) is copied next to the project, because the OS may clear those directories at any time.
Constructors
- ProjectStorage({Directory? root, Directory? temporaryDirectory})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String id) → Future< void> -
list(
) → Future< List< ProjectSummary> > - Saved projects, most recently modified first.
-
load(
String id) → Future< StoredProject?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
{String? id, required String title, required ProjectState state}) → Future< String> -
Saves
stateand returns the project id (a new one whenidis null). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ProjectStorage
-
Shared instance using the platform documents directory.
final