CacheMetadataStore class
Tracks download progress and completion status. Persists metadata to survive app restarts.
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
-
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.
inherited
Static Methods
-
clearAll(
) → Future< void> - Clear all metadata.
-
get(
String url) → Future< CacheMetadata?> - Get metadata for URL.
-
getDownloadedBytes(
String url) → Future< int> - Get downloaded bytes for URL.
-
isComplete(
String url) → Future< bool> - Check if URL is fully cached.
-
markComplete(
String url, int totalBytes) → Future< void> - Mark download as complete.
-
remove(
String url) → Future< void> - Remove metadata for URL.
-
removeByHash(
String hash) → Future< void> - Remove metadata by URL hash. Used by LRU cache eviction when the original URL is not known.
-
updateProgress(
String url, {required int downloadedBytes, int? totalBytes, bool isHls = false}) → Future< void> - Update progress for a URL.