writeInt method
Implementation
void writeInt(int byteLength, int value, [Endian? endian]) {
switch (byteLength) {
case 1:
writeInt8(value);
break;
case 2:
writeInt16(value, endian);
break;
case 4:
writeInt32(value, endian);
break;
case 8:
writeInt64(value, endian);
break;
default:
throw ArgumentError(
'byteLength ($byteLength) must be one of [1, 2, 4, 8].');
}
}