serialize method
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;
}
Serializes the Point struct to a ByteBuffer.
ByteBuffer serialize() {
final buffer = ByteData(sizeOf<Point>());
buffer.setInt32(0, x, Endian.host);
buffer.setInt32(4, y, Endian.host);
return buffer.buffer;
}