isNumeric function

bool isNumeric(
  1. dynamic s
)

Check if a String is numeric value

Implementation

bool isNumeric(dynamic s) {
  try {
    if (s is double) return true;
    double.parse(s);
    return true;
  } catch (_) {}
  return false;
}