DefaultCacheManager class
Stub DefaultCacheManager for unsupported platforms.
This is used as the fallback in the conditional import and should never actually be instantiated at runtime.
- Inheritance
-
- Object
- CacheManager
- DefaultCacheManager
- Mixed-in types
Constructors
- DefaultCacheManager({Duration stalePeriod = const Duration(days: 7), int maxNrOfCacheObjects = 200, ConnectionParameters? connectionParameters})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → Future< void> -
Close the cache database.
override
-
emptyCache(
) → Future< void> -
Remove all files from the cache.
override
-
getFileFromCache(
String key, {bool ignoreMemCache = false}) → Future< FileInfo?> -
Get the file from the cache.
override
-
getFileStream(
String url, {String? key, Map< String, String> ? headers, bool withProgress = false}) → Stream<FileResponse> -
Get the file from the cache and/or online, depending on availability
and age.
override
-
getImageFile(
String url, {String? key, Map< String, String> ? headers, bool withProgress = false, int? maxHeight, int? maxWidth}) → Stream<FileResponse> -
Returns a resized image file to fit within
maxHeightandmaxWidth.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
putFile(
String url, List< int> fileBytes, {String? key, String? eTag, Duration maxAge = const Duration(days: 30), String fileExtension = 'file'}) → Future<File> -
Put a file in the cache.
override
-
removeFile(
String key) → Future< void> -
Remove a file from the cache.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited