isDigits property

bool get isDigits

Whether this string contains only digits.

Implementation

bool get isDigits => RegExp(r'^\d+$').hasMatch(this);