RandomStringGenerator class Null safety

Random string generator.

Can be used to generate passwords as well.

Constructors

RandomStringGenerator({int? fixedLength, int? minLength, int? maxLength, bool hasAlpha = true, AlphaCase alphaCase = AlphaCase.MIXED_CASE, bool hasDigits = true, bool hasSymbols = true, bool mustHaveAtLeastOneOfEach = true, List<String>? customUpperAlphabet, List<String>? customLowerAlphabet, List<String>? customDigits, List<String>? customSymbols})
Constructor [...]

Properties

alphaCase AlphaCase
Specify the case (upper, lower or mixed) for the hasAlpha property. Has effect only if the property is TRUE.
read / write
customDigits List<String>?
You might want to provide your custom digits.
read / write
customLowerAlphabet List<String>?
You might want to provide your custom lowercase alphabet.
read / write
customSymbols List<String>?
You might want to provide your custom symbols.
read / write
customUpperAlphabet List<String>?
You might want to provide your custom uppercase alphabet.
read / write
fixedLength int?
Generated string fixed length.
read / write
hasAlpha bool
Boolean flag to specify if the generated string should have alpha characters in it.
read / write
hasDigits bool
Boolean flag to specify if the generated string should have digits in it.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
hasSymbols bool
Boolean flag to specify if the generated string should have symbols in it.
read / write
maxLength int?
Generated string maximum length. (use min and max OR fixed, not both)
read / write
minLength int?
Generated string minimum length. (use min and max OR fixed, not both)
read / write
mustHaveAtLeastOneOfEach bool
This boolean flag is maybe the most interesting thing about this string generator. Here's how it works: [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

generate() String
Generate the string using current properties
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited