nextId static method

String nextId()

Returns UnitId.cycleId of current microsecondsSinceEpoch and adds 4 random chars to end of String. UnitId.aZn is used as input - so result is case sensitive and with numbers.

Implementation

static String nextId() {
  final stamp = DateTime.now().toUtc().microsecondsSinceEpoch;

  return cycleId(stamp, aZn) + randomId(length: 4, sequence: aZn);
}