readUint24 method Null safety

  1. @override
int readUint24()
override

Read a 24-bit word from the stream.

Implementation

@override
int readUint24() {
  final b1 = buffer[offset++] & 0xff;
  final b2 = buffer[offset++] & 0xff;
  final b3 = buffer[offset++] & 0xff;
  if (byteOrder == BIG_ENDIAN) {
    return b3 | (b2 << 8) | (b1 << 16);
  }
  return b1 | (b2 << 8) | (b3 << 16);
}