setInt method
Writes a signed integer to a region of the buffer.
The value is written to the range [offset : offset+length].
The range must satisy the relations 0 ≤ offset ≤ offset+length ≤ this.length.
Returns the position of the last element written to the buffer ([offset]+[length]).
final Buffer buffer = Buffer(3);
buffer.setInt(4091987, 0, 3);
print(buffer); // [83, 112, 62]
Implementation
int setInt(
final int value,
final int offset,
final int length, [
final Endian endian = Endian.little,
]) {
return _setBytes(_toBytes(value, length), offset, endian);
}