isDigit method

bool isDigit()

Check text contains only digit

Implementation

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