isValidPassword static method
Returns true if str is at least 6 characters long and contains an
uppercase letter, a lowercase letter, and at least one digit or symbol.
Implementation
static bool isValidPassword(String? str) {
if (str.isNullOrEmpty) return false;
return _passwordPattern.hasMatch(str!);
}