unique_names_generator 1.0.0
unique_names_generator: ^1.0.0 copied to clipboard
Unique name generator package for generating random and unique names.
Unique name generator is a dart package for generating random and unique names.
P.S: Port of https://www.npmjs.com/package/unique-names-generator
đ Features #
It comes with a list of dictionaries out of the box, but you can also provide your custom ones.
đšī¸ Usage #
A custom Config() object can be passed to generator object where:
length -> No of words you want to generate
seperator -> Seperator in between the words (defaults to '_');
dictionaries -> Source of words (use predefined or custom ones as per your usecase)
style -> Style in which you want the words to get generated
Possible values for
style: Style.lowerCase, Style.capital, Style.upperCase
Predefined dictionaries
adjectives, animals, colors, countries, languages, names, starWars
final generator = UniqueNamesGenerator(
// Config.fallback() can also be used
config: Config(
dictionaries: [adjectives, animals, colors]
),
);
final word = generator.generate();