asBool property

bool get asBool

Returns true if the number is greater than 0.

Implementation

bool get asBool => (this ?? 0) > 0;