versionOf static method

int? versionOf(
  1. String value
)

Version number of a UUID (1-8), or null if it is not one. UUUID.versionOf(UUUID.uuidV7()) → 7

Implementation

static int? versionOf(String value) => isValid(value) ? int.parse(value[14], radix: 16) : null;