setInt method

int setInt(
  1. int value,
  2. int offset,
  3. int length, [
  4. Endian endian = Endian.little,
])

Writes a signed integer to a region of the buffer. The value is written to the range [offset : offset+length]. The range must satisfy the relations 0offsetoffset+lengththis.length. Returns the position of the last element written to the buffer ([offset]+[length]).

Implementation

int setInt(
  final int value,
  final int offset,
  final int length, [
  final Endian endian = Endian.little,
]) {
  return _setBytes(_toBytes(value, length), offset, endian);
}