https://github.com/abichinger/unique-name-generator
Random name generator based on dictonaries.
https://github.com/abichinger/unique-name-generator
Last synced: over 1 year ago
JSON representation
Random name generator based on dictonaries.
- Host: GitHub
- URL: https://github.com/abichinger/unique-name-generator
- Owner: abichinger
- License: mit
- Created: 2022-09-12T09:52:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-13T12:59:56.000Z (almost 4 years ago)
- Last Synced: 2025-01-24T17:48:05.321Z (over 1 year ago)
- Language: Dart
- Size: 28.3 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A dart package to generate unique usernames based on dictionaries.
This library is a port of the node.js package [unique-names-generator
](https://www.npmjs.com/package/unique-names-generator#api) by [Andrea SonnY](https://github.com/andreasonny83/unique-names-generator)
## Features
- includes a [list of dictionaries](https://github.com/abichinger/unique-name-generator/tree/main/lib/src/dict)
- supports custom dictionaries
## Installation
```
dart pub add unique_name_generator
```
or
```
flutter pub add unique_name_generator
```
## Usage
```dart
import 'package:unique_name_generator/unique_name_generator.dart';
void main() {
var ung = UniqueNameGenerator(
dictionaries: [adjectives, animals],
style: NameStyle.capital,
separator: '_',
);
List 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]
}
```