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