selectorExists method

bool selectorExists(
  1. String selector
)

Returns true if the given selector exists in the settings file.

Implementation

bool selectorExists(String selector) {
  var valid = true;
  try {
    traverse(selector);
  } on PathNotFoundException catch (_, __) {
    valid = false;
  }
  return valid;
}