isDigit method

bool isDigit()

Check text contains only digit

Implementation

bool isDigit() {
  if (!this.isNotNullEmpty()) {
    return false;
  }
  return RegExp(kOnlyDigitPtrn).hasMatch(this!);
}