setSelectedCondition method

void setSelectedCondition(
  1. int minLength,
  2. dynamic normalCharCount,
  3. dynamic uppercaseCharCount,
  4. dynamic lowercaseCharCount,
  5. dynamic numericCharCount,
  6. dynamic specialCharCount,
)

Recognize user selected condition from widget constructor to put them on map with their value

Implementation

void setSelectedCondition(int minLength, normalCharCount, uppercaseCharCount, lowercaseCharCount,
    numericCharCount, specialCharCount) {
  _selectedCondition = {
    if (minLength > 0) strings.atLeast: false,
    if (normalCharCount > 0) strings.normalLetters: false,
    if (uppercaseCharCount > 0) strings.uppercaseLetters: false,
    if (lowercaseCharCount > 0) strings.lowercaseLetters: false,
    if (numericCharCount > 0) strings.numericCharacters: false,
    if (specialCharCount > 0) strings.specialCharacters: false
  };
}