formatBitrate static method
Implementation
static String formatBitrate(int bitrate) {
if (bitrate < 1000) {
return "$bitrate bit/s";
}
if (bitrate < 1000000) {
final kbit = (bitrate / 1000).floor();
return "~$kbit KBit/s";
}
final mbit = (bitrate / 1000000).floor();
return "~$mbit MBit/s";
}