username_generator
1.3.0, released 6 years ago by prikeshsavla.com
A Dart library that creates random or seedable usernames for emails and user forms.
What it does
It generates usernames from a base string, optionally adding numbers, prefixes, suffixes, dates, or adjectives. It can also produce a list of usernames and supports custom separators.
AI-written summary of version 1.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need quick, deterministic usernames for sign‑up forms or email addresses
- You want a lightweight solution without external dependencies
- You need seedable output for testing or reproducible results
Skip it when
- You require server‑side uniqueness guarantees
- You need full user authentication or management
- You need complex validation beyond simple formatting
Strengths
- Zero dependencies and null‑safe
- Simple, chainable API
- Supports prefixes, suffixes, dates, adjectives, and custom separators
Weaknesses
- Only generates strings, no validation or uniqueness checks
- No Flutter widgets or UI components
- Limited to basic username patterns
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:username_generator/username_generator.dart';
void main(){
var gen = UsernameGenerator();
print(gen.generateRandom()); // e.g., limitation_virulent_1
print(gen.generate('John Doe', prefix:'admin', suffix:'ops'));
}Alternatives
Packages that do the same job and could replace username_generator.
- random_user_agents
Generate random User-Agent strings for Dart/Flutter apps
72Compare - word_generator
A Dart utility package for generating random words, names, usernames, and passwords.
73Compare - dart_random_choice
Select a random element from any iterable, optionally using weights.
46Compare - random_string
Generates random ASCII strings, numbers, and alphanumeric sequences for testing purposes.
50Compare
Works with
Packages commonly used together with username_generator: ones it builds on, ones built on it, and its own family.