conditions property

List<LogCondition> get conditions

The filter as a set of conditions: one per set field, one per tag and per attribute. A store with its own query language translates exactly these (LogCondition), and matches checks the same ones, so the meaning of the selection is defined in one place.

Implementation

List<LogCondition> get conditions => _conditions[this] ??= List.unmodifiable([
  if (after case final after?) LogAfterCondition(after),
  if (before case final before?) LogBeforeCondition(before),
  if (levels.isNotEmpty) LogLevelCondition(levels),
  for (final tag in tags) LogTagCondition(tag),
  for (final attribute in attributes) LogAttributeCondition(attribute),
  if (text.isNotEmpty) LogTextCondition(text),
]);