MwmStorage class
Storage service for MWM file metadata.
Tracks downloaded regions with version information for update detection.
Properties
- bundledCount → int
-
Get count of bundled maps.
no setter
- downloadedCount → int
-
Get count of downloaded maps (excluding bundled).
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalDownloadedSize → int
-
Get total size of all downloaded maps in bytes.
no setter
Methods
-
clear(
) → Future< void> - Clear all metadata.
-
deleteAllDownloaded(
) → Future< List< DeleteResult> > - Delete all downloaded (non-bundled) maps.
-
deleteMap(
String regionName) → Future< DeleteResult> - Delete a downloaded map file and remove its metadata.
-
deleteMaps(
List< String> regionNames) → Future<List< DeleteResult> > - Delete multiple maps at once.
-
fileExists(
String regionName) → Future< bool> - Check if a specific region's MWM file actually exists on disk.
-
getAll(
) → List< MwmMetadata> - Get all stored metadata.
-
getByRegion(
String regionName) → MwmMetadata? - Get metadata for a specific region.
-
getOrphanedRegions(
) → Future< List< String> > - Get list of regions with orphaned metadata (missing files).
-
hasOrphanedMetadata(
) → Future< bool> - Check if metadata is orphaned (file doesn't exist on disk).
-
hasUpdate(
String regionName, String latestSnapshotVersion) → bool - Check if an update is available for a region.
-
isDownloaded(
String regionName) → bool - Check if a region is downloaded.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pruneOrphaned(
) → Future< List< String> > - Remove all metadata for files that no longer exist.
-
remove(
String regionName) → Future< void> - Remove metadata for a region.
-
toString(
) → String -
A string representation of this object.
inherited
-
upsert(
MwmMetadata metadata) → Future< void> - Add or update metadata for a region.
-
validateAll(
{bool pruneOrphaned = false, void onProgress(int current, int total)?}) → Future< List< FileValidationResult> > - Validate all stored metadata against actual files on disk.
-
validateAllStream(
) → Stream< FileValidationResult> - Stream-based validation for reactive UI updates.
-
validateFile(
String regionName) → Future< FileValidationResult> - Validate that a region's file exists and optionally check its size.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
) → Future< MwmStorage> - Create and initialize the storage service.