isNumeric method
Returns true if the string contains only numeric characters.
Implementation
bool isNumeric() {
final numericRegex = RegExp(r'^\d+$');
return numericRegex.hasMatch(this);
}
Returns true if the string contains only numeric characters.
bool isNumeric() {
final numericRegex = RegExp(r'^\d+$');
return numericRegex.hasMatch(this);
}