I need to find out if a string is numeric in dart. It needs to return true on any valid number type in dart. So far, my solution is
for anyone wanting a non native way using regex
RegExp _numeric = RegExp(r'^-?[0-9]+$'); /// check if the string contains only numbers bool isNumeric(String str) { return _numeric.hasMatch(str); }