This Dart package specializes in generating random and unique names.
Note: This is a Dart adaptation of the npm package unique-names-generator.
- Built-in Dictionaries: A variety of default dictionaries included.
- Customization: Ability to use custom dictionaries.
Create a Config()
object with the following parameters for the generator:
length
: Number of words to generate.separator
: Character to separate words (default '_').dictionaries
: Sources of words (choose from predefined or add custom ones).style
: Desired style for word generation.
Style.lowerCase
Style.capital
Style.upperCase
adjectives
animals
colors
countries
languages
names
starWars
final generator = UniqueNamesGenerator(
config: Config(
dictionaries: [adjectives, animals, colors]
),
);
final word = generator.generate();