FileDownloader class

Constructors

FileDownloader({required String url, String? filePath, bool? forceRedownload, bool? notAcceptRanges, Map<String, dynamic> headers = const {}, int? fileSizeAlreadyKnown, void onStartReal(String url, String filePath)?, void onFailed(String url, String filePath, String code, String msg, Exception? e)?, int progressCallbackIntervalMills = 300, int retryTimes = 1, Map<String, Object> tags = const {}, required void onSuccess(String url, String filePath), void onProgress(String url, String filePath, int total, int alreadyReceived, int speed)?, void onCancel(String url, String filePath)?})

Properties

filePath String?
getter/setter pair
fileSizeAlreadyKnown int?
getter/setter pair
forceRedownload bool?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>
getter/setter pair
notAcceptRanges bool?
getter/setter pair
onCancel ↔ void Function(String url, String filePath)?
getter/setter pair
onFailed ↔ void Function(String url, String filePath, String code, String msg, Exception? e)?
getter/setter pair
onProgress ↔ void Function(String url, String filePath, int total, int alreadyReceived, int speed)?
getter/setter pair
onStartReal ↔ void Function(String url, String filePath)?
getter/setter pair
onSuccess ↔ void Function(String url, String filePath)
getter/setter pair
progressCallbackIntervalMills int
getter/setter pair
retryTimes int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveDir String?
getter/setter pair
tags Map<String, Object>
getter/setter pair
url String
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
start() Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

dio ← Dio
no getter
globalSaveDir String?
getter/setter pair
openLog bool
no getter

Static Methods

cancel(String url) → void
initDio() → Dio