CachedMapTileMetadata class

Metadata about a tile cached with a MapCachingProvider

Caching is usually determined with HTTP headers. However, if a specific implementation chooses to, it can solely use isStale and set the other properties to null.

External usage of this class is not usually necessary. It is visible so other tile providers may make use of it.

Annotations

Constructors

CachedMapTileMetadata({required DateTime staleAt, required DateTime? lastModified, required String? etag})
Create new metadata
const
CachedMapTileMetadata.fromHttpHeaders(Map<String, String> headers, {Uri? warnOnFallbackUsage, Duration fallbackFreshnessAge = const Duration(days: 7)})
Create new metadata based off an HTTP response's headers
factory

Properties

etag String?
If available, the value in HttpHeaders.etagHeader
final
hashCode int
The hash code for this object.
no setteroverride
isStale bool
Whether this tile should be considered stale
no setter
lastModified DateTime?
If available, the value in HttpHeaders.lastModifiedHeader (UTC)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staleAt DateTime
The calculated time at which this tile becomes stale (UTC)
final

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.
override