PasswordGenerator constructor

PasswordGenerator({
  1. bool hasCapitalLetters = true,
  2. bool hasSmallLetters = true,
  3. bool hasNumbers = true,
  4. bool hasSymbols = true,
  5. int length = 10,
})

Implementation

PasswordGenerator({
  this.hasCapitalLetters = true,
  this.hasSmallLetters = true,
  this.hasNumbers = true,
  this.hasSymbols = true,
  this.length = 10,
})  : assert(
        hasCapitalLetters || hasNumbers || hasSmallLetters || hasSymbols,
        'At least one of the conditions must be true.',
      ),
      assert(
        length > 0,
        'length must be more than 0.',
      );