isZeroOrNegative property
bool
get
isZeroOrNegative
Returns true
if the number is zero or negative.
This is a convenient way to check if a number is not strictly positive.
Example:
5.isZeroOrNegative; // Returns false
0.isZeroOrNegative; // Returns true
(-3).isZeroOrNegative; // Returns true
Implementation
bool get isZeroOrNegative => this == 0 || isNegative;