progress property

double? get progress

download progress as an double between 0 and 1. When the final size is unknown or the downloaded size exceeds the total size progress is null.

Implementation

double? get progress {
  // ignore: avoid_returning_null
  if (totalSize == null || downloaded > totalSize!) return null;
  return downloaded / totalSize!;
}