i64ToBytes function

Uint8List i64ToBytes(
  1. int value
)

Implementation

Uint8List i64ToBytes(int value) {
  //because of browser limitations
  int l = value;
  var b = BytesBuilder();
  for (int i = 7; i >= 0; i--) {
    b.addByte(l & 0xFF);

    l >>= 8;
  }
  return Uint8List.fromList(b.toBytes().reversed.toList());
  //return Uint8List(8)..buffer.asByteData().setUint64(0, value, Endian.big);
}