ModelFileManager class abstract

Implementers

Constructors

ModelFileManager.new()

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

clearModelCache() Future<void>
Clears current model cache/state
deleteCurrentModel() Future<void>
Deletes current active model (legacy method without parameters)
deleteLoraWeights() Future<void>
Removes LoRA weights from current model
deleteModel(ModelSpec spec) Future<void>
Deletes a model and all its files
downloadModel(ModelSpec spec, {String? token}) Future<void>
Downloads a model without progress tracking
downloadModelWithProgress(ModelSpec spec, {String? token}) Stream<DownloadProgress>
Downloads a model with progress tracking
ensureModelReady(String filename, String url) Future<void>
Ensures a model is ready for use, handling all necessary operations
getInstalledModels(ModelManagementType type) Future<List<String>>
Gets all installed models for a specific type
getModelFilePaths(ModelSpec spec) Future<Map<String, String>?>
Gets the file paths for an installed model
getStorageStats() Future<Map<String, int>>
Gets storage statistics
installModelFromAsset(String path, {String? loraPath}) Future<void>
Installs model from Flutter assets (debug only)
installModelFromAssetWithProgress(String path, {String? loraPath}) Stream<int>
Installs model from Flutter assets with progress tracking (debug only)
isAnyModelInstalled(ModelManagementType type) Future<bool>
Checks if ANY model of the given type is installed
isModelInstalled(ModelSpec spec) Future<bool>
Check if a model is installed and valid
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performCleanup() Future<void>
Performs cleanup of orphaned files
setLoraWeightsPath(String path) Future<void>
Sets path to LoRA weights for current model
setModelPath(String path, {String? loraPath}) Future<void>
Sets direct path to existing model files
toString() String
A string representation of this object.
inherited
validateModel(ModelSpec spec) Future<bool>
Validates all files for a model specification

Operators

operator ==(Object other) bool
The equality operator.
inherited