isValidId static method

bool isValidId(
  1. String id
)

Returns true if the given id conforms to the proper regex pattern.

Regex pattern ^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$

Implementation

static bool isValidId(String id) =>
    RegExp(r"^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$").hasMatch(id);