FMTCTileProviderSettings constructor
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)
To access the existing settings, if any, get instance.
Implementation
factory 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,
}) {
final settings = FMTCTileProviderSettings._(
behavior: behavior,
fallbackToAlternativeStore: fallbackToAlternativeStore,
cachedValidDuration: cachedValidDuration,
maxStoreLength: maxStoreLength,
obscuredQueryParams: obscuredQueryParams.map((e) => RegExp('$e=[^&]*')),
errorHandler: errorHandler,
);
if (setInstance) _instance = settings;
return settings;
}