A dart package to generate unique usernames based on dictionaries.
This library is a port of the node.js package unique-names-generator by Andrea SonnY
Features
- includes a list of dictionaries
- supports custom dictionaries
Installation
dart pub add unique_name_generator
or
flutter pub add unique_name_generator
Usage
import 'package:unique_name_generator/unique_name_generator.dart';
void main() {
var ung = UniqueNameGenerator(
dictionaries: [adjectives, animals],
style: NameStyle.capital,
separator: '_',
);
List<String> names = List.generate(10, (index) => ung.generate());
print(names);
//Output: [Painful_Wren, Primary_Chicken, Swift_Wolf, Guilty_Rhinoceros, Silent_Panther, Still_Unicorn, Frail_Aphid, Willowy_Skink, Continued_Clownfish, Magnificent_Tyrannosaurus]
}
Libraries
- unique_name_generator
- A dart package to generate unique usernames based on dictionaries.