isUUID function

bool isUUID(
  1. String input, [
  2. String version = 'all'
])

check if string input is an UUID (version 3, 4 or 5 version is an optional positioned param pass String value for version version expected values -> '3', '4', '5', 'all' by default 'all' is used

Implementation

bool isUUID(String input, [String version = 'all']) {
  RegExp pattern = _uuid[version]!;
  return pattern.hasMatch(input);
}