Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prikeshsavla/username_generator.dart
A random and seedable username generators for signup forms in flutter and dart
https://github.com/prikeshsavla/username_generator.dart
dart dartlang flutter generator seed username-generator
Last synced: about 2 months ago
JSON representation
A random and seedable username generators for signup forms in flutter and dart
- Host: GitHub
- URL: https://github.com/prikeshsavla/username_generator.dart
- Owner: prikeshsavla
- License: mit
- Created: 2021-01-16T16:49:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-13T16:01:18.000Z (about 2 years ago)
- Last Synced: 2023-08-20T23:27:41.960Z (over 1 year ago)
- Topics: dart, dartlang, flutter, generator, seed, username-generator
- Language: Dart
- Homepage: https://pub.dev/packages/username_generator
- Size: 390 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# username_generator
[![pub package](https://img.shields.io/pub/v/username_generator.svg)](https://pub.dev/packages/username_generator) [![pub points](https://badges.bar/username_generator/pub%20points)](https://pub.dev/packages/username_generator/score) [![popularity](https://badges.bar/username_generator/popularity)](https://pub.dev/packages/username_generator/score) [![likes](https://badges.bar/username_generator/likes)](https://pub.dev/packages/username_generator/score)
A simple library for generating random and seedable username for emails or user forms
## Usage
A simple usage example:
```dart
import 'package:username_generator/username_generator.dart';/// main function to start example
void main() {
var generator = UsernameGenerator();//default separator is "_"
generator.separator = '_'; // optional
print(generator.generateRandom());
// limitation_virulent_1print(generator.generate('John'));
// john_75print(generator.generate('John Doe'));
// john_doe_6print(generator.generate('John Doe', hasNumbers: false));
// john_doeprint(generator.generate('John Doe', hasNumbers: false, prefix: 'admin', suffix: 'ops'));
// admin_john_doe_opsprint(generator.generate('[email protected]', date: DateTime.parse('1996-01-15')));
// johndoe_96print(generator.generate('[email protected]', date: DateTime.parse('1996-01-15'), shortYear:false));
// johndoe_1996print(
generator.generateForName('John',
lastName: 'Doe', adjectives: ['ready', 'happy']),
);
// doe_john_10_ready
print(
generator.generateForName('John',
lastName: 'Doe', adjectives: ['ready', 'happy']),
);
// doe_john_10_readyprint(
generator.generateList('John Doe', adjectives: ['ready', 'happy'], length: 5),
);
// [
// happy_doe_john_12,
// 24_john_happy,
// 70_ready_john,
// 47_doe_ready,
// ready_john_87
// ]
}```
## Features and bugsPlease file feature requests and bugs at the [issue tracker][tracker].
[tracker]: https://github.com/prikeshsavla/username_generator.dart/issues
## Roadmap