bigIntToLeBytes static method

Uint8List bigIntToLeBytes(
  1. BigInt value,
  2. int length
)

Implementation

static Uint8List bigIntToLeBytes(BigInt value, int length) {
  final result = Uint8List(length);
  var temp = value;
  for (int i = 0; i < length; i++) {
    result[i] = (temp & BigInt.from(0xFF)).toInt();
    temp >>= 8;
  }
  return result;
}