isNumeric function

bool isNumeric(
  1. String s
)

Implementation

bool isNumeric(String s) {
  return RegExp(r'^-?[0-9]+$').hasMatch(s);
}