utils/number library


bytesToHex(List<int> bytes, {bool include0x = false}) String
Converts the bytes given as a list of integers into a hexadecimal representation.
bytesToInt(List<int> bytes) BigInt
Converts the bytes from that list (big endian) to a BigInt.
decodeBigInt(List<int> bytes, {Endian endian = Endian.little}) BigInt
encodeBigInt(BigInt number, {Endian endian = Endian.little, int? bitLength}) Uint8List
log2(num x) num
numberToHex(dynamic number, {bool pad = false, bool include0x = false, int? forcePadLen}) String
Converts the number, which can either be a dart int or a BigInt, into a hexadecimal representation. The number needs to be positive or zero.