writeBigInt64 method
Implementation
void writeBigInt64(BigInt v, [Endian endian = Endian.big]) {
BigInt unsigned = v.toUnsigned(64);
List<int> bytes = List<int>.filled(8, 0);
for (int i = 7; i >= 0; i--) {
bytes[i] = (unsigned & BigInt.from(0xFF)).toInt();
unsigned >>= 8;
}
write(bytes);
}