writeShort method

void writeShort(
  1. int value, {
  2. bool signed = false,
})
inherited

Write a single 2 byte short.

Implementation

void writeShort(int value, {bool signed = false}) {
  flush(2);
  signed
      ? writeByteData.setInt16(writePosition, value, _endianness)
      : writeByteData.setUint16(writePosition, value, _endianness);
  writePosition += 2;
}