encodeFromBigInt static method

Uint8List encodeFromBigInt(
  1. BigInt value
)

Implementation

static Uint8List encodeFromBigInt(BigInt value) {
  final bytes = bigIntToBytes(value);
  final result = value.isNegative ? Uint8List(32).complement : Uint8List(32);
  result.setAll(32 - bytes.lengthInBytes, bytes);
  return result;
}