DownloadProgress class

Represents the current state of a download operation. receivedByte is the number of bytes already downloaded, and totalByte is the total number of bytes expected to be downloaded. The progress property returns this ratio as a double between 0.0 and 1.0. The receivedKB and totalKB properties return Kilobytes The receivedMB and totalMB properties return megabytes The receivedGB and totalGB properties return gigabytes

Available extensions

Constructors

DownloadProgress.new({required int receivedByte, required int totalByte})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
progress double
Calculates the download progress as a ratio between 0 and 1.0.
no setter
receivedByte int
The number of bytes already downloaded.
final
receivedGB double
Converts the download progress to gigabytes.
no setter
receivedKB double
Converts the download progress to kilobytes.
no setter
receivedMB double
Converts the download progress to megabytes.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
totalByte int
The total number of bytes expected to be downloaded.
final
totalGB double
no setter
totalKB double
no setter
totalMB double
no setter

Methods

getProgressPercent({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

Converts the download progress to a string representing the percentage.
getReceivedGB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

Converts the download progress to a string representing the gigabytes.
getReceivedKB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

Converts the download progress to a string representing the kilobytes.
getReceivedMB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

Converts the download progress to a string representing the megabytes.
getTotalGB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

getTotalKB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

getTotalMB({int fractionDigits = 2}) String

Available on DownloadProgress, provided by the DownloadProgressExtension extension

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

Operators

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