toInt method

int toInt()

Converts the boolean to 1 if true, otherwise 0.

Implementation

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