isStrongPassword property

bool get isStrongPassword

Returns true if the string is a strong password. (At least 8 characters, 1 uppercase, 1 lowercase, 1 number, 1 special char)

Implementation

bool get isStrongPassword {
  return RegExp(
    r'^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$',
  ).hasMatch(this);
}