isValidPairingCodeFormat property Null safety

bool isValidPairingCodeFormat

Valid pairing code contains uppercase letters and digits, with a length of 6

Implementation

bool get isValidPairingCodeFormat {
  // Regex taken from:
  // https://stackoverflow.com/questions/49757486/how-to-use-regex-in-dart
  final nameRegExp = RegExp(r'^[A-Z0-9]+$');
  return nameRegExp.hasMatch(this) && length==6;
}