serialize method

ByteBuffer serialize()

Serializes the Point struct to a ByteBuffer.

Implementation

ByteBuffer serialize() {
  final buffer = ByteData(sizeOf<Point>());
  buffer.setInt32(0, x, Endian.host);
  buffer.setInt32(4, y, Endian.host);
  return buffer.buffer;
}