agrees static method

bool agrees(
  1. String target,
  2. String label
)

True when label names the requested thing (or is more generic, or merely appends a trailing descriptor).

Implementation

static bool agrees(String target, String label) {
  final a = agreement(target, label);
  return a == LabelAgreement.exact ||
      a == LabelAgreement.narrower ||
      a == LabelAgreement.broader;
}