OfflineCacheManager class abstract

Offline cache manager. @attention This feature is not available in the free MapKit version.

Implemented types

Constructors

OfflineCacheManager()

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

addErrorListener(OfflineCacheManagerErrorListener errorListener) → void
Subscribe on errors
addRegionListener(OfflineCacheRegionListener regionListener) → void
Subscribe on status events
addRegionListUpdatesListener(OfflineMapRegionListUpdatesListener regionListUpdatesListener) → void
Subscribe on update of region list
allowUseCellularNetwork(bool useCellular) → void
Indicates whether to allow downloading using cellular networks (3G, LTE, and other). Disallowed by default.
clear(OfflineCacheManagerClearListener callback) → void
Erases all data for downloads and regions and wipes the cache. Forces reloading the list from the remote source
computeCacheSize(OfflineCacheManagerSizeListener callback) → void
Calculates the full cache size in bytes.
drop(int regionId) → void
Drop region data from the device. If data is being downloaded then downloading is cancelled.
enableAutoUpdate(bool enable) → void
Enables autoupdating downloaded caches when they become outdated.
getCities(int regionId) List<String>
Returns a list of cities.
getDownloadedReleaseTime(int regionId) DateTime?
Release time of downloaded region files
getProgress(int regionId) double
Current region progress [0,1]. For downloaded files returns 1; If we haven't start download yet, returns 0;
getState(int regionId) OfflineCacheRegionState
Current region state
isLegacyPath(int regionId) bool
Returns true if region has files with legacy localized path. If region in downloading state result may be incorrect.
isValid() bool
Usable only in runWithBlockUi or listener handlers.
mayBeOutOfAvailableSpace(int regionId) bool
Returns true if available disk space might not be enough for installation of the region data.
moveData(OfflineCacheDataMoveListener dataMoveListener, {required String newPath}) → void
Moves offline caches to the specified folder. This operation is non-cancellable. If there is already a pending operation to set the cache path, it throws an error (Android). If the application exits before the operation is completed, it does not take effect, but garbage will not be cleared.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseDownload(int regionId) → void
Pause downloading of region
regions() List<OfflineCacheRegion>
Copying a list of regions from memory. All changes of regions won't affected on on the collection.
removeErrorListener(OfflineCacheManagerErrorListener errorListener) → void
Unsubscribe from errors
removeRegionListener(OfflineCacheRegionListener regionListener) → void
Unsubscribe from status events
removeRegionListUpdatesListener(OfflineMapRegionListUpdatesListener regionListUpdatesListener) → void
Unsubscribe from region list update
requestPath(OfflineCacheManagerPathGetterListener callback) → void
Provides the data path for offline cache files.
requestRegionsAtPoint(Point point, RegionsAtPointListener callback) → void
Provides ids of regions containing specified point. Some of the returned regions may not be available in current regions list.
setCachePath(OfflineCacheManagerPathSetterListener pathSetterListener, {required String path}) → void
Sets a new path for caches. If the specified path contains an existing cache, this cache will be used; otherwise, a new cache will be initialized.
startDownload(int regionId) → void
Start to download new offline cache for the region or update if region has been downloaded
stopDownload(int regionId) → void
Stop downloading of region
toString() String
A string representation of this object.
inherited

Operators

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