FMTCTileProviderSettings class

Settings for an FMTCTileProvider

This class is a kind of singleton, which maintains a single instance, but allows allows for a one-shot creation where necessary.

Constructors

FMTCTileProviderSettings({CacheBehavior behavior = CacheBehavior.cacheFirst, bool fallbackToAlternativeStore = true, Duration cachedValidDuration = const Duration(days: 16), int maxStoreLength = 0, List<String> obscuredQueryParams = const [], FMTCBrowsingErrorHandler? errorHandler, bool setInstance = true})
Create new settings for an FMTCTileProvider, and set the instance (if setInstance is true, as default)
factory

Properties

behavior CacheBehavior
The behaviour to use when retrieving and writing tiles when browsing
final
cachedValidDuration Duration
The duration until a tile expires and needs to be fetched again when browsing. Also called validDuration.
final
errorHandler ↔ (void Function(FMTCBrowsingError exception)?)
A custom callback that will be called when an FMTCBrowsingError is raised
getter/setter pair
fallbackToAlternativeStore bool
Whether to retrieve a tile from another store if it exists, as a fallback, instead of throwing an error
final
hashCode int
The hash code for this object.
no setteroverride
maxStoreLength int
The maximum number of tiles allowed in a cache store (only whilst 'browsing' - see below) before the oldest tile gets deleted. Also called maxTiles.
final
obscuredQueryParams Iterable<RegExp>
A list of regular expressions indicating key-value pairs to be remove from a URL's query parameter list
final
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.
override

Static Properties

instance FMTCTileProviderSettings
Get an existing instance, if one has been constructed, or get the default intial configuration
no setter