Downloader<T extends DLProvider> class

Represents top-level downloader.

Constructors

Downloader({required T provider, HttpClient? client})
const

Properties

client HttpClient?
final
hashCode int
The hash code for this object.
no setterinherited
provider → T
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

download({required Uri url, Map<String, String> headers = _defaultHeaders}) Future<DLResponse>
Downloads an URL and returns a stream that can be consumed.
downloadToDirectory({required Uri url, required Directory directory, Map<String, String> headers = _defaultHeaders, String? filename, String? defaultFilename, bool overwriteFile = false}) Future<FileDLResponse>
Downloads an URL and returns a stream that finishes when the output file is fully written.
downloadToFile({required Uri url, required File file, Map<String, String> headers = _defaultHeaders, bool overwriteFile = false}) Future<FileDLResponse>
Downloads an URL and returns a stream that finishes when the output file is fully written.
downloadToFileFromDLResponse(DLResponse res, File file, {bool overwriteFile = false}) Future<FileDLResponse>
Takes in a download response and returns a stream that finishes when the output file is fully written.
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