networkSpeedAsString property

String get networkSpeedAsString

Use the hasExpectedFileSize, hasNetworkSpeed and hasTimeRemaining getters to determine whether a field is valid

String is '-- MB/s' if N/A, otherwise in MB/s or kB/s

Implementation

String get networkSpeedAsString => switch (networkSpeed) {
  <= 0 => '-- MB/s',
  >= 1 => '${networkSpeed.round()} MB/s',
  _ => '${(networkSpeed * 1000).round()} kB/s',
};