FromBits static method
Returns a ByteSize object initialized by size in Bits.
var size = ByteSize.FromBits(10000);
Implementation
static ByteSize FromBits(dynamic value) {
if (value is int) {
return ByteSize(value / _BitsInByte);
} else if (value is BigInt) {
return ByteSize(value / BigInt.from(_BitsInByte));
} else {
throw FormatException('Invalid value');
}
}