DownloadTaskRegistry class

Registry to track background_downloader tasks by filename

This class maintains the mapping between our model filenames and the internal taskIds used by background_downloader package. This enables proper resume detection and cleanup.

Constructors

DownloadTaskRegistry.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

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 registered tasks (for cleanup/reset)
getAllRegisteredTasks() Future<Map<String, String>>
Get all registered filename -> taskId mappings
getStats() Future<Map<String, dynamic>>
Get statistics about registered tasks
getTaskId(String filename) Future<String?>
Get the taskId for a specific filename
isRegistered(String filename) Future<bool>
Check if a filename is currently registered
registerTask(String filename, String taskId) Future<void>
Register a download task for a specific filename
registerTasks(Map<String, String> tasks) Future<void>
Bulk register multiple tasks
unregisterTask(String filename) Future<void>
Unregister a task when download completes or fails permanently
unregisterTasks(List<String> filenames) Future<void>
Bulk unregister multiple tasks