DownloadFile class Null safety
DownloadFile handles the downlood process
Constructors
- DownloadFile({required DownloadFileConfig config, dynamic onRecieveProgress(int totalDownloaded, int totalSize)?, dynamic errorCallback(String errorMessage)?})
Properties
- config → DownloadFileConfig
-
The DownloadFileConfig. It contains settings that governs the download process
final
-
downloadProgress
→ Stream<
List< int> > -
read-only
- errorCallback → (dynamic Function(String errorMessage)?)
-
Callback when an error occures
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- onRecieveProgress → (dynamic Function(int totalDownloaded, int totalSize)?)
-
callback to notify the current upload progress. Similar to
_downloadProgress
final - runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
dispose(
) → void -
download(
) → Future< bool> - download starts the download process. It starts to download the file
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
pauseDownload(
) → void - Pauses the download
-
prepareDownload(
) → Future< bool> - prepareDownload initialize the needed parameters that are needed for the download operation
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited