Filter class
Used for filtering data
It should be used inside a map as a value for comparison Example:
final filter = {
'name': Filter.eq('John'),
'id': Filter.gte(5),
'amount': Filter.between(5, 10),
'or': Filter.or([
{'name': Filter.notEq('Evan')},
{'name': Filter.notEq('Mark')},
]),
'author': Filter.relation(
'name',
Filter.eq('Rijk van Zanten'),
),
};
Constructors
- Filter(Object? value)
- Check if the values are equal
-
Filter.and(List<
Map< filters)String, Filter> > - Filter.between(Object? from, Object? to)
- Check to see if value is between.
- Filter.contains(Object? value)
- Check to see if field contains value.
- Filter.empty()
- Check to see if value is empty.
- Filter.eq(Object? value)
- Check if the values are equal.
- Filter.gt(Object? value)
- Check to see if value is greater then.
- Filter.gte(Object? value)
- Check to see if value is greater then or equal.
- Filter.isIn(List value)
- Check to see if value in is provided list.
- Filter.isNull()
- Check to see if value is null.
- Filter.lt(Object? value)
- Check to see if value is less then.
- Filter.lte(Object? value)
- Check to see if value is less then or equal.
- Filter.notBetween(Object? from, Object? to)
- Check to see if value is not between.
- Filter.notContains(Object? value)
- Check to see if field does not contain value.
- Filter.notEmpty()
- Check to see if value is not empty.
- Filter.notEq(Object? value)
- Check if the values are not equal.
- Filter.notIn(List value)
- Check to see if field in not is provided list.
- Filter.notNull()
- Check to see if value is not null.
-
Filter.or(List<
Map< filters)String, Filter> > - Filter.relation(String value, Filter filter)
-
Relation
const
Properties
- comparison → String
-
Comparison that will be done (equal, not equal, less then...).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → Object?
-
Value to compare it to
final
Methods
-
convertFilterList(
List< Map< filters) → List<String, Filter> >Map< String, Object?> > - Convert List to List.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMapEntry(
String field) → MapEntry< String, Object?> -
Convert filter to MapEntry, with provided
field
name. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited