setBigUint method
Writes a big unsigned integer to a region of the buffer.
The value is written to the range [offset : offset+length]. If length is omitted, it
defaults to the value's byte length.
The range must satisy the relations 0 ≤ offset ≤ offset+length ≤ this.length.
Returns the position of the last element written to the buffer ([offset]+[length]).
final Buffer buffer = Buffer(8);
buffer.setBigUint(BigInt.parse('18446744073709551615'), 0);
print(buffer); // [255, 255, 255, 255, 255, 255, 255, 255]
Implementation
int setBigUint(
final BigInt value,
final int offset, [
final int? length,
final Endian endian = Endian.little,
]) {
assert(value >= BigInt.zero, 'The [BigInt] value $value must be a positive integer.');
return setBigInt(value, offset, length, endian);
}