searchSet method

bool searchSet(
  1. String pattern
)

Push a new pattern into the engine. Returns the engine's compile result; an empty pattern is always reported as valid (matches the UI's behavior for "no pattern → no error indicator").

Implementation

bool searchSet(String pattern) {
  _searchPattern = pattern;
  final ok = _engine?.searchSet(pattern) ?? false;
  _searchValid = ok || pattern.isEmpty;
  notifyListeners();
  return ok;
}