nextBool method - Random class - dart:math library (original) (raw)

description

nextBool abstract method

bool nextBool()

Generates a random boolean value.

Example:

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

Implementation

bool nextBool();