nextBool method

bool nextBool()

Generates a boolean value: true or false with equal probability.

Implementation

@pragma('vm:prefer-inline')
bool nextBool() => (nextInt() & 1) == 1;