ModelDownloader class
Constructors
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
-
downloadModel(
String modelId) → Stream< DownloadProgress> - Download a model with progress tracking Returns a stream of download progress
-
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
-
cancelDownload(
String modelId) → Future< void> - Cancel an ongoing download
-
checkModelCompatibility(
String modelId) → Future< ModelCompatibility> - Check if a model is compatible with the current device Returns compatibility information including expected performance
-
cleanupIncompleteDownloads(
) → Future< void> - Clean up incomplete or corrupted downloads
-
deleteModel(
String modelId) → Future< void> - Delete a downloaded model to free up space
-
getAvailableModels(
) → Future< List< ModelInfo> > - Get list of all available models from the bundled model list
-
getDeviceInfo(
) → Future< DeviceInfo> - Get device information including chipset, NPU/GPU/CPU support, and performance level
-
getDownloadedModels(
) → Future< List< String> > - Get list of all downloaded models
-
getModelPath(
String modelId) → Future< String?> - Get the local file path for a downloaded model Returns null if model is not downloaded
-
getModelsByType(
String type) → Future< List< ModelInfo> > - Get models filtered by type
-
getModelsDirectory(
) → Future< String> - Get the directory where models are stored
-
getStorageInfo(
) → Future< StorageInfo> - Get storage information
-
isModelDownloaded(
String modelId) → Future< bool> - Check if a model is already downloaded