writeUint method

void writeUint(
  1. int byteLength,
  2. int value, [
  3. Endian? endian
])
inherited

Implementation

void writeUint(int byteLength, int value, [Endian? endian]) {
  switch (byteLength) {
    case 1:
      writeUint8(value);
      break;
    case 2:
      writeUint16(value, endian);
      break;
    case 4:
      writeUint32(value, endian);
      break;
    case 8:
      writeUint64(value, endian);
      break;
    default:
      throw ArgumentError(
          'byteLength ($byteLength) must be one of [1, 2, 4, 8].');
  }
}