isDecimal property

bool get isDecimal

Returns true if string is Decimal number. Decimal String: only contains digits 0-9.

"xyz".isDecimal;    // false
"12".isDecimal;     // true

Implementation

bool get isDecimal => toInt() != null;