Use the offline manager to download map regions for offline usage.
The OfflineManager cannot be used on web.
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
-
clearAmbientCache(
) → Future< void> - Erase resources from the ambient cache, freeing storage space.
-
dispose(
) → void - Call to free resources when the OfflineManager is no longer needed.
-
downloadRegion(
{required String mapStyleUrl, required LngLatBounds bounds, required double minZoom, required double maxZoom, required double pixelDensity, Map< String, Object?> metadata = const {}}) → Stream<DownloadProgress> - Downloads a map region.
-
getOfflineRegion(
{required int regionId}) → Future< OfflineRegion> - Retrieve given region in the offline database.
-
invalidateAmbientCache(
) → Future< void> - Forces re-validation of the ambient cache.
-
listOfflineRegions(
) → Future< List< OfflineRegion> > - Retrieve all regions in the offline database.
-
mergeOfflineRegions(
{required String path}) → Future< List< OfflineRegion> > - Merge offline regions from a secondary database into the main offline database.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
packDatabase(
) → Future< void> - Packs the existing database file into a minimal amount of disk space.
-
resetDatabase(
) → Future< void> - Delete existing database and re-initialize.
-
runPackDatabaseAutomatically(
{required bool enabled}) → void - Sets whether database file packing occurs automatically. By default, the automatic database file packing is enabled.
-
setMaximumAmbientCacheSize(
{required int bytes}) → Future< void> - Set the maximum size of the ambient cache in bytes.
-
setOfflineTileCountLimit(
{required int amount}) → void - Sets the maximum number of tiles that may be downloaded and stored on the current device. By default, the limit is set to 6,000.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createInstance(
) → Future< OfflineManager> - Create a new OfflineManager.