RoomPlanScanLibrary class
Saves scans and their output files in app-managed persistent storage.
Each entry contains a JSON record and optional copies of its PDF and USDZ.
The default location is the app support directory. Pass directory to use
an app-controlled location or a temporary directory in tests.
Constructors
- RoomPlanScanLibrary({Directory? directory})
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> - Deletes a saved scan and its copied output files.
-
exportJson(
String id) → Future< String> - Encodes a scan record as portable JSON without embedding PDF/USDZ bytes.
-
importJson(
String source) → Future< SavedRoomScan> - Imports JSON created by exportJson as a new library entry.
-
listScans(
) → Future< List< SavedRoomScan> > - Lists valid saved scans, newest first.
-
load(
String id) → Future< SavedRoomScan?> - Loads one saved scan by ID, or returns null if it no longer exists.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
persistOutput(
File source, {required String fileName}) → Future< File> - Copies a standalone output, such as a merged multi-room USDZ, into persistent app storage and returns its durable file path.
-
rename(
String id, String name) → Future< SavedRoomScan> - Changes the display name of a saved scan.
-
save(
{required String name, required ScanResult scanResult, File? pdfFile, File? modelFile}) → Future< SavedRoomScan> - Saves a new scan and copies any provided outputs into the library.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited