SmartAssetsDownloadManager class
资源下载管理器
WHY: 管理资源的自动下载、解压和版本控制
Constructors
Properties
- assetRegistry → AssetRegistry
-
获取资源注册表
no setter
- config → SmartAssetsConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInitialized → bool
-
是否已初始化
no setter
-
progress
→ ValueNotifier<
double> -
获取下载进度(0.0-1.0)
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
status
→ ValueNotifier<
SmartAssetsDownloadStatus> -
获取下载状态
no setter
Methods
-
cancelDownload(
) → Future< void> - 取消下载
-
cancelHdAssetDownload(
String assetPath) → Future< void> - 取消高清资源下载
-
clearDownloadedAssets(
) → Future< void> - 清理所有下载的资源
-
deleteHdAsset(
String assetPath) → Future< void> - 删除高清资源
-
dispose(
) → void - 释放资源
-
downloadAssets(
) → Future< void> - 下载资源
-
downloadHdAsset(
String assetPath, String hdAssetUrl, {dynamic onProgress(double progress)?}) → Future< String> - 下载高清资源
-
getAssetStatus(
String assetPath) → AssetStatus - 获取指定资源的状态
-
getAssetVersionInfo(
String assetPath) → AssetVersionInfo? - 获取指定资源的版本信息
-
getDownloadedAssetPaths(
) → List< String> - 获取所有已下载的资源路径
-
getHdAssetPath(
String assetPath) → Future< String?> - 获取高清资源文件路径
-
getHdAssetProgress(
String assetPath) → double - 获取指定高清资源的下载进度(0.0-1.0)
-
getHdAssetStatus(
String assetPath) → HdAssetDownloadStatus? - 获取指定高清资源的下载状态
-
initialize(
{bool autoDownload = true}) → Future< void> - 初始化管理器
-
isHdAssetDownloaded(
String assetPath) → Future< bool> - 检查高清资源是否已下载
-
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