convertIntToByteList function

Uint8List convertIntToByteList(
  1. int number
)

Convert 64-bit int to byte list. Source: https://stackoverflow.com/a/57536472/376497

Implementation

Uint8List convertIntToByteList(int number) {
  final byteList = Uint8List(8);
  byteList.buffer.asByteData().setInt64(0, number, Endian.big);
  return byteList;
}