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
In Dart 2 this method is deprecated
int.parse(s, onError: (e) => null)
instead, use
bool _isNumeric(String str) { if(str == null) { return false; } return double.tryParse(str) != null; }