isDigitsOnly function

bool isDigitsOnly (String s)

Implementation

bool isDigitsOnly(String s) {
  if (s == null) {
    return false;
  }
  return int.tryParse(s) != null;
}