nextBool method

  1. @override
bool nextBool()
override

Generates a random boolean value.

Example:

var boolValue = Random().nextBool(); // true or false, with equal chance.

Implementation

@override
bool nextBool() {
  _updateState();
  return _updateState() > _halfMax32;
}