UniversalCachedManager class
A universal implementation of the CacheManager<File> class for non-web platforms.
The UniversalCacheManager provides functionality to cache images and other
assets locally in mobile and desktop environments using the file system.
Methods:
-
UniversalCacheManager({Duration cacheCleanupThreshold}):- Constructs an instance of the
UniversalCacheManagerclass.
- Constructs an instance of the
-
Future<File> getLocalFile(String url):- Retrieves a local file corresponding to the specified URL in a non-web scenario.
-
Future<void> preCacheAsset(String assetPath):- Pre-caches an asset from the application's bundle into the temporary directory.
- Inheritance
-
- Object
- CachedManager<
File> - UniversalCachedManager
Constructors
- UniversalCachedManager({Duration cacheCleanupThreshold = const Duration(days: 7)})
- Constructs an instance of the UniversalCachedManager class.
Properties
- cacheCleanupThreshold → Duration
-
The duration after which cached files are considered stale and
eligible for deletion.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getLocalFile(
String url) → Future< File> -
Retrieves a local file corresponding to the specified
urlin a non-web scenario.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preCacheAsset(
String assetPath) → Future< void> -
Pre-caches an asset from the application's bundle into the
temporary directory.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited