nextBool abstract method Null safety

bool nextBool()

Generates a random boolean value.

Example:

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

Implementation

bool nextBool();