FileDownloader class
Downloads a file from a given URL and saves it locally
Constructors
- FileDownloader({required String url, String? filename, String? outputDir, ProgressCallback? onProgressCallback})
- Creates a new FileDownloader
Properties
- bytesDownloaded ↔ int
-
getter/setter pair
- destination ↔ String?
-
getter/setter pair
- filename → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onProgressCallback → ProgressCallback?
-
final
- outputDir → String
-
final
- outputFilename → String
-
Gets the filename
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalSize → int
-
Gets the total file size
no setter
- type → String
-
Gets the content type
no setter
- url → String
-
final
Methods
-
deleteFile(
) → void - Deletes the downloaded file if it exists
-
download(
) → Future< void> - Downloads the file from the URL
-
getMetadata(
) → Future< void> - Retrieves file metadata (size and type)
-
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