short_readable_id 1.5.1 copy "short_readable_id: ^1.5.1" to clipboard
short_readable_id: ^1.5.1 copied to clipboard

outdated

A short human readable and easily memorable unique id generator.

short_readable_id #

A short human readable and easily memorable unique id generator.

Generating short human readable id #

void main() {
  print(idGenerator.generateReadable());  // => VVGU-976
}

Configuring separator #

Use separator parameter to configure the separator used between alphabetical and numerical parts of the id.

void main() {
  print(idGenerator.generateReadable(separator: ''));  // => VVGU976
}

Generating short id #

void main() {
  print(idGenerator.generate());  // => 1YQOBQO
}

Choose date reference #

The parameter refDate lets the programmer configure reference date that is used to generate a part of the generated id. The most recent date you pick, the shorter will be the generated id.

void main() {
  final gen = IdGenerator(refDate: DateTime(2050));
}

Worker id #

Worker id is used to generate the id to make sure ids generated by multiple concurrent id generators do not conflict. Configure worker id using workerId parameter.

void main() {
  final gen = IdGenerator(workerId: 5);
}
2
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A short human readable and easily memorable unique id generator.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

More

Packages that depend on short_readable_id