toInt method

int toInt()

Converts the boolean to an integer (1 for true, 0 for false).

Implementation

int toInt() => this ? 1 : 0;