IdGenerator class

Short unique id generator

Constructors

IdGenerator({int workerId: 0, DateTime refDate})
Use refDate to configure reference date to compute time part of the id. Use workerId to maintain uniqueness when concurrent generators are used.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
refDate DateTime
Reference date used for generation of time part of the id.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
workerId int
Worker id. This should be unique across concurrent generators intended to generate unique ids for same target.
final

Methods

generate() String
generateReadable({String separator: '-'}) String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited