nextPut method
Put the next byte into the buffer.
If there are no unwrittenCount left, then evaluate the optional
onEnd
function and return false.
Otherwise, return true.
Implementation
bool nextPut(int byte, {void Function()? onEnd}) {
if (isFull()) {
onEnd?.call();
return false;
} else {
basicNextPut(byte);
return true;
}
}