YustFilter class

The Filter class represents a document filter

The field may be a String consisting of a single field name (referring to a top level field in the document), or a series of field names separated by dots '.'

Annotations
  • @JsonSerializable()

Constructors

YustFilter({required String field, required YustFilterComparator comparator, dynamic value})
YustFilter.empty()
YustFilter.fromJson(Map<String, dynamic> json)
factory

Properties

comparator YustFilterComparator
The comparator to compare the value of the brick with the brickId value
getter/setter pair
field String
The ID of the brick this filter refers to
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value ↔ dynamic
The Value to compare the value of the brick with brickId to
getter/setter pair

Methods

isFieldMatching(dynamic fieldValue) bool
Checks if a value is matching or not.
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.
override

Static Properties

comparatorStrings Map<YustFilterComparator, String>
A map with the YustFilterComparator and the string repesentation.
getter/setter pair

Static Methods

comparatorFromString(String comparatorString) YustFilterComparator
Get the FilterComparator from a string (e.g. '=' => YustFilterComparator.equal)
comparatorToString(YustFilterComparator? comparator, {bool useDoubleEqual = false}) String?
Return the String representation for a comparator (e.g. YustFilterComparator.equal => '=') or an '?' if the comparator is not found
from(YustFilter f) YustFilter
Create a new filter based on an exiting one