how to check string contains only numbers in dart code example
Example: check only digits in dart
bool isNumeric(String s) {
if (s == null) {
return false;
}
return double.tryParse(s) != null;
}
bool isNumeric(String s) {
if (s == null) {
return false;
}
return double.tryParse(s) != null;
}