toInt property

int get toInt

Returns 1 if this boolean is true, and 0 if this boolean is false.

Example: true.toInt -> 1.

Implementation

int get toInt => this ? 1 : 0;