MemoryTileBitmapCache class

This is a memory-only implementation of the TileBitmapCache. It stores the bitmaps in memory. We use a factory and remember all active instances. This way we can easily purge caches if needed.

Inheritance

Constructors

MemoryTileBitmapCache.create()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage → Storage<Tile, TileBitmap>
final

Methods

addTileBitmap(Tile tile, TileBitmap tileBitmap) → void
Adds a bitmap to the cache
override
dispose() → void
disposes the cache. It should not be used anymore after disposing.
override
getTileBitmapAsync(Tile tile) Future<TileBitmap?>
override
getTileBitmapSync(Tile tile) → TileBitmap?
Returns the requested bitmap for the given Tile
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
purgeAll() → void
Purges the whole cache. The cache can be used afterwards but will not return any items
override
purgeByBoundary(BoundingBox boundingBox) → void
Purges the cache whose Tiles intersects with the given boundingBox. Any bitmap which is fully or partially intersecting the given boundingBox will be purged.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

purgeAllCaches() → void
purgeCachesByBoundary(BoundingBox boundingBox) → void