setupRandom static method

void setupRandom(
  1. GenerateRandom? random
)

Implementation

static void setupRandom(GenerateRandom? random) {
  if (random == null) {
    _generateRandom = (length) {
      return prng.nextBytes(length);
    };
  } else {
    _generateRandom = random;
  }
}