intToBuffer function

Uint8List intToBuffer(
  1. dynamic i
)

Converts an int or BigInt to a Uint8List

Implementation

Uint8List intToBuffer(i) {
  return Uint8List.fromList(i == null || i == 0 || i == BigInt.zero
      ? []
      : dynamicToUint8List(padToEven(intToHex(i).substring(2))));
}