nextBytes method
Fills a subrange of the specified byte array starting
from fromIndex inclusive and ending toIndex exclusive with random bytes.
Implementation
ByteArray nextBytes(
ByteArray array, {
Int fromIndex = 0,
Int toIndex = DEFAULT_BUFFER_SIZE,
}) {
return List.generate(
toIndex - fromIndex,
(index) => this.nextInt(index),
);
}