isDigit property

bool get isDigit

Returns true if the string is a digit.

Implementation

bool get isDigit => RegExp(r'^[0-9]$').hasMatch(this);