v2 static method

String v2()

Generates a timestamp-based ID with prefix 'G'

Implementation

static String v2() {
  final special = 8 + _random.nextInt(4);

  return 'G${DateTime.now().millisecondsSinceEpoch}-${_printDigits(special, 1)}${_bits(12, 3)}-${_bits(12, 4)}';
}