toInt property

int toInt

convert bool to int with value 0 or 1 based on boolean value

Implementation

int get toInt => this! ? 1 : 0;