isStrongPassword method
Whether the string meets common password strength rules.
Implementation
bool isStrongPassword(
{int minLength = 8,
bool requireUppercase = true,
bool requireLowercase = true,
bool requireDigit = true,
bool requireSpecial = true}) =>
length >= minLength &&
(!requireUppercase || containsUppercase()) &&
(!requireLowercase || containsLowercase()) &&
(!requireDigit || containsDigit()) &&
(!requireSpecial || containsSpecialCharacter());