isStrongPassword static method

bool isStrongPassword(
  1. String value
)

Returns true for a strong password (min 8 chars, mixed case + digit).

Implementation

static bool isStrongPassword(String value) {
  if (value.length < 8) return false;
  return RegExp(r'[a-z]').hasMatch(value) &&
      RegExp(r'[A-Z]').hasMatch(value) &&
      RegExp(r'[0-9]').hasMatch(value);
}