isValidAlphanumericOTP method

bool isValidAlphanumericOTP([
  1. int length = 6
])

Implementation

bool isValidAlphanumericOTP([int length = 6]) {
  return this.length == length && RegExp(r'^[A-Za-z0-9]+$').hasMatch(this);
}