short_readable_id 1.5.1

Dart native js
Flutter Android iOS web

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);
}
0
likes
90
pub points
18%
popularity

A short human readable and easily memorable unique id generator.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

tejainece@gmail.com

License

BSD (LICENSE)

More

Packages that depend on short_readable_id