isWholeNumber property

bool get isWholeNumber

Checks if the number is a whole number (has no fractional part).

Implementation

bool get isWholeNumber => this % 1 == 0;