matchCount property

int get matchCount

How many nodes currently match the search query (0 when not filtering).

Implementation

int get matchCount {
  final q = _query.trim().toLowerCase();
  if (q.isEmpty) return 0;
  var n = 0;
  TreeOps.walk<T>(_roots, (node, _) {
    if (node.label.toLowerCase().contains(q)) n++;
  });
  return n;
}