writeInt16 method

void writeInt16(
  1. int value,
  2. [Endian endian = Endian.big]
)

Writes an 16-bit signed integer.

Implementation

void writeInt16(int value, [Endian endian = Endian.big]) {
  ensureAvailableLength(2);

  final length = this._length;
  _byteData.setInt16(length, value, endian);
  this._length = length + 2;
}