An open API service indexing awesome lists of open source software.

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.

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]
}
```