randomBool static method

bool randomBool()

Returns a pseudo-random boolean (true or false). Using the math.Random class.

Implementation

@pragma("vm:prefer-inline")
static bool randomBool() {
  return _rnd.nextBool();
}