FileDownloader constructor

FileDownloader({
  1. required String url,
  2. String? filePath,
  3. bool? forceRedownload,
  4. bool? notAcceptRanges,
  5. Map<String, dynamic> headers = const {},
  6. int? fileSizeAlreadyKnown,
  7. void onStartReal(
    1. String url,
    2. String filePath
    )?,
  8. void onFailed(
    1. String url,
    2. String filePath,
    3. String code,
    4. String msg,
    5. Exception? e,
    )?,
  9. int progressCallbackIntervalMills = 300,
  10. int retryTimes = 1,
  11. Map<String, Object> tags = const {},
  12. required void onSuccess(
    1. String url,
    2. String filePath
    ),
  13. void onProgress(
    1. String url,
    2. String filePath,
    3. int total,
    4. int alreadyReceived,
    5. int speed,
    )?,
  14. void onCancel(
    1. String url,
    2. String filePath
    )?,
})

Implementation

FileDownloader({
  required this.url,
  this.filePath,
  this.forceRedownload,
  this.notAcceptRanges,
  this.headers = const {},
  this.fileSizeAlreadyKnown,
  this.onStartReal,
  this.onFailed,
  this.progressCallbackIntervalMills = 300,
  this.retryTimes = 1,
  this.tags = const {},
  required this.onSuccess,
  this.onProgress,
  this.onCancel,
});