isNumeric method

bool isNumeric()

Checks if the string contains only numeric characters.

Implementation

bool isNumeric() {
  return RegExp(r'^\d+\$').hasMatch(this);
}