setInt16 method
Writes a signed integer to 2-bytes.
The offset must satisy the relations 0 ≤ offset ≤ offset+2 ≤ this.length.
final Buffer buffer = Buffer(2);
buffer.setInt16(4104, 0);
print(buffer); // [8, 16]
Implementation
void setInt16(final int value, final int offset, [final Endian endian = Endian.little]) {
return asByteData().setInt16(offset, value, endian);
}