isNum property

bool get isNum

Checks if string is int or double.

Implementation

bool get isNum {
  if (isEmpty) {
    return false;
  }

  return num.tryParse(this) is num;
}