writeInt16 method

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

Writes the value as a 2 byte long signed integer at the current writerIndex (inclusive).

endian the endianness of the number, defaults to kEndianness which is initialized with Endian.big.


Exceptions:

Implementation

void writeInt16(int value, [Endian? endian]) =>
    writeByteData(2).setInt16(0, value, endian ?? kEndianness);