getBool static method

bool getBool([
  1. double chance = 0.5
])

Implementation

static bool getBool([double chance = 0.5]) {
  return random.nextDouble() < chance;
}