getPasswordValidations static method
Implementation
static String getPasswordValidations(
{required String weakTitle,
required String mediumTitle,
required String strongTitle,
required String defaultTitle,
required String password}) {
double s = getPasswordStrength(password);
if (s < 0.3) {
return weakTitle;
} else if (s > 0.3 && s < 0.6) {
return mediumTitle;
} else if (s > 0.6) {
return strongTitle;
} else {
return defaultTitle;
}
}