setBool method

int setBool(
  1. bool value,
  2. int offset
)

Writes a boolean value to 1-byte. The offset must satisfy the relations 0offsetoffset+1this.length.

Returns the position of the last element written to the buffer ([offset]+1).

Implementation

int setBool(final bool value, final int offset) {
  asByteData().setUint8(offset, value ? 1 : 0);
  return offset + ByteLength.u8;
}