Buffer.random constructor
Creates a Buffer of size length, initialized with random values in the range of [0:maxUint8].
The random number generator defaults to Random.secure.
Implementation
factory Buffer.random(final int length, [final Random? random]) {
final Random rand = random ?? Random.secure();
return Buffer.generate(length, (_) => rand.nextInt(_maxUint8 + 1));
}