randomBytes function
Implementation
Uint8List randomBytes(int n) {
final Random generator = Random.secure();
final Uint8List random = Uint8List(n);
for (int i = 0; i < random.length; i++) {
random[i] = generator.nextInt(255);
}
return random;
}