timeOf static method

DateTime? timeOf(
  1. String value
)

Creation time stored in a v7 UUID. UUUID.timeOf(id)

Implementation

static DateTime? timeOf(String value) {
  if (versionOf(value) != 7) return null;
  return DateTime.fromMillisecondsSinceEpoch(int.parse(value.replaceAll("-", "").substring(0, 12), radix: 16));
}