TileCacheManager class

Manages the tile cache store used by MapTileLayer.

Provides static methods to initialize, access, and clear the tile cache.

On Android, iOS, Windows, macOS and Linux the cache is stored in the system's temporary directory under a MapTiles subdirectory. On web there is no temp directory, so tiles are cached in memory for the lifetime of the tab instead. Check isInMemory if you need to know which one you got.

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

cacheMaxAge → Duration
Get the current cache max age.
no setter
isInMemory → bool
Whether tiles are cached in memory rather than on disk.
no setter

Static Methods

clearCache() → Future<void>
Clears all cached map tiles and resets the internal widget cache.
initCacheStore() → Future<CacheStore>
Initialize or return the shared cache store.
setCacheMaxAge(Duration duration) → void
Set a custom cache max age. Call this before building any MapTileLayer.

Constants

defaultCacheMaxAge → const Duration
Default cache duration (30 days).