Config class Null safety

Constructors

Config(String cacheKey, {Duration stalePeriod, int maxNrOfCacheObjects, CacheInfoRepository repo, FileSystem fileSystem, FileService fileService})
Config file for the CacheManager. cacheKey is used for the folder to store files and for the database file name. stalePeriod is the time duration in which a cache object is considered 'stale'. When a file is cached but not being used for a certain time the file will be deleted. maxNrOfCacheObjects defines how large the cache is allowed to be. If there are more files the files that haven't been used for the longest time will be removed. repo is the CacheInfoRepository which stores the cache metadata. On Android, iOS and macOS this defaults to CacheObjectProvider, a sqflite implementation due to legacy. On web this defaults to NonStoringObjectProvider. On the other platforms this defaults to JsonCacheInfoRepository. The fileSystem defines where the cached files are stored and the fileService defines where files are fetched, for example online.
factory

Properties

cacheKey String
read-only
fileService FileService
read-only
fileSystem → FileSystem
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
maxNrOfCacheObjects int
read-only
repo CacheInfoRepository
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stalePeriod Duration
read-only

Methods

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

Operators

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