SearchExpression class

A multi-expression that searches for the specified resource or resources in a search. All resource objects that satisfy the expression's condition are included in the search results. You must specify at least one subexpression, filter, or nested filter. A SearchExpression can contain up to twenty elements.

A SearchExpression contains the following components:

  • A list of Filter objects. Each filter defines a simple Boolean expression comprised of a resource property name, Boolean operator, and value.
  • A list of NestedFilter objects. Each nested filter defines a list of Boolean expressions using a list of resource properties. A nested filter is satisfied if a single object in the list satisfies all Boolean expressions.
  • A list of SearchExpression objects. A search expression object can be nested in a list of search expression objects.
  • A Boolean operator: And or Or.

Constructors

SearchExpression({List<Filter>? filters, List<NestedFilters>? nestedFilters, BooleanOperator? operator, List<SearchExpression>? subExpressions})

Properties

filters List<Filter>?
A list of filter objects.
final
hashCode int
The hash code for this object.
no setterinherited
nestedFilters List<NestedFilters>?
A list of nested filter objects.
final
operator BooleanOperator?
A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists to be satisfied for the entire search expression to be true, specify And. If only a single conditional statement needs to be true for the entire search expression to be true, specify Or. The default value is And.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subExpressions List<SearchExpression>?
A list of search expression objects.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited