getKeyType static method

KeyType getKeyType(
  1. String key, {
  2. bool enforceNameSpace = false,
})

Returns one of the valid keys from KeyType if there is a regex match. Otherwise returns KeyType.invalidKey Set enforceNamespace=true for strict namespace validation in the key.

Implementation

static KeyType getKeyType(String key, {bool enforceNameSpace = false}) {
  return RegexUtil.keyType(key, enforceNameSpace);
}