BigIntDataExtension extension

Data extension for BigInt.

on

Properties

isSafeInteger bool
Returns true if this as int is safe for the current platform (DataSerializerPlatform).
no setter

Methods

checkSafeInteger() → void
Checks if this as int is safe for the current platform (DataSerializerPlatform).
toBytes() Uint8List
Serializes this BigInt to bytes (Uint8List). The serialized data is prefixed with the size of the bytes that contains the big-integer.
toHex({int width = 0}) String
Converts this BigInt to a HEX string.
toHex32() String
Same as toHexUnsigned, but ensure a width of 4 bytes (8 HEX width).
toHex64() String
Same as toHexUnsigned, but ensure a width of 8 bytes (16 HEX width).
toHexUnsigned({int width = 0}) String
Same as toHex, but will ensure that the HEX string is unsigned, converting the HEX bits to a signed integer, like a Uint32.
toUint8List32() Uint8List
Converts this BigInt to a Uint8List of 4 bytes (32 bits).
toUint8List64() Uint8List
Converts this BigInt to a Uint8List of 8 bytes (64 bits).
writeTo(BytesBuffer out) int
Writes this BigInt to out. See toBytes for encoding description.