UDownloadManager class
Methods
addListener (VoidCallback listener )
→ void
Register a closure to be called when the object changes.
inherited
cancel (String id )
→ Future <void >
clearCompleted ()
→ Future <void >
Name kept from the media download manager.
clearFinished ()
→ Future <void >
dispose ()
→ void
Discards any resources used by the object.
override
download (String url , {UDownloadDestination destination = const UDownloadDestination.downloads() , String ? fileName , bool wifiOnly = false , int ? connections , UChecksum ? checksum })
→ Future <UDownloadTask >
Convenience for the common case: download url to destination with default settings.
enqueue (UDownloadRequest request )
→ Future <UDownloadTask >
fetchBytes (String url , {void onProgress (double progress )?, int connections = 1 })
→ Future <Uint8List >
Silent download into memory. Not listed, not persisted, not resumable across restarts.
fetchToStorage (String url , String key , {UStorageBucket bucket = UStorageBucket.support , void onProgress (double progress )?, UChecksum ? checksum , Duration ? expireIn , bool persistent = true })
→ Future <String >
Silent download into UFileStorage . Returns the key once the file is stored.
init ({UDownloadConfig ? config })
→ Future <void >
load ()
→ Future <void >
Name kept from the media download manager.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners ()
→ void
Call all the registered listeners.
inherited
open (UDownloadTask task )
→ Future <bool >
pause (String id )
→ Future <void >
pauseAll ()
→ Future <void >
remove (String id , {bool deleteFile = false })
→ Future <void >
Removes a task from the list; with deleteFile also deletes what it downloaded.
removeListener (VoidCallback listener )
→ void
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
resume (String id )
→ Future <void >
resumeAll ()
→ Future <void >
retry (String id )
→ Future <void >
Starts a finished or failed task over from byte zero.
reveal (UDownloadTask task )
→ Future <bool >
share (UDownloadTask task )
→ Future <void >
task (String id )
→ UDownloadTask ?
toString ()
→ String
A string representation of this object.
inherited