MediaDownloadManager class
缓存信息类(内部使用)已被 CacheEntry 替代 全局下载管理器(单例)
Constructors
- MediaDownloadManager()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tasks
→ Map<
String, MediaDownloadTask> -
no setter
Methods
-
cleanupCacheLRU(
int maxSize, {CacheEvictionPolicy? policy}) → Future< void> - 使用策略清理缓存 (默认 TTL + LRU)
-
clearAllCache(
) → Future< void> - 清除所有缓存
-
getCacheRoot(
) → Future< Directory> - 获取缓存根目录
-
getCacheSize(
) → Future< int> - 获取缓存大小
-
getOrCreateTask(
String mediaUrl, {Map< String, String> ? headers}) → Future<MediaDownloadTask> - 获取或创建下载任务
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTaskIfInactive(
String mediaUrl, {Map< String, String> ? headers}) → Future<void> - 移除任务(当没有活跃会话时)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited