estTotalDuration property
Duration
estTotalDuration
The estimated total duration of the download
It may or may not be accurate, except when isComplete is true
, in which
event, this will always equal elapsedDuration.
It is not recommended to display this value directly to your user. Instead, prefer using language such as 'about 𝑥 minutes remaining'.
Implementation
Duration get estTotalDuration => isComplete
? elapsedDuration
: Duration(
seconds:
(((maxTiles / tilesPerSecond.clamp(1, largestInt)) / 10).round() *
10)
.clamp(elapsedDuration.inSeconds, largestInt),
);