FetchProgress.downloading constructor

  1. @visibleForTesting
FetchProgress.downloading(
  1. FetchUrl fetch,
  2. int length,
  3. int downloaded, {
  4. required FetchProgress? prior,
})

Fetch is downloading. You will get multiples of this event.

Implementation

@visibleForTesting
FetchProgress.downloading(this.fetch, this.length, this.downloaded,
    {required this.prior})
    : status = FetchStatus.downloading,
      progress = length != 0 ? downloaded / length : 0,
      headers = null,
      responseCode = null {
  prior?.prior = null;
}