PasswordGenerator class
PasswordGenerator is a class that can be used to generate strong passwords to be used in all kinds of applications.
Example:
final _passwordGenerator = PasswordGenerator(
length: 10,
hasCapitalLetters: true,
hasNumbers: true,
hasSmallLetters: true,
hasSymbols: true,
);
final String _password = _passwordGenerator.generatePassword();
Constructors
Properties
- hasCapitalLetters ↔ bool
-
A boolean value to tell if the password should have capital letters
in it or not. defaults to true.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNumbers ↔ bool
-
A boolean value to tell if the password should have numbers in it or not.
defaults to true.
latefinal
- hasSmallLetters ↔ bool
-
A boolean value to tell if the password should have small letters in
it or not. defaults to true.
latefinal
- hasSymbols ↔ bool
-
A boolean value to tell if the password should have symbols in it or not.
defaults to true.
latefinal
- length ↔ int
-
An integer value that indicates the length of the password.
defaults to 10.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
generatePassword(
) → String - Generates new random password.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited