binary property

int get binary

Converts the nullable boolean to its binary representation as an integer.

Returns 1 if the value is non-null and true, otherwise returns 0.

Implementation

int get binary => (this ?? false) ? 1 : 0;