Filters class

Object used for filtering items from collection.

Provide Map in which key represent column name, and value is Filter. Filter provides named constructor for every comparison available. If you use OR or AND, Map's key will be ignored. You can also use F instead of Filter, it's an alias, so it's the same

Filters({
  'name': Filter.eq('John'),
  'email': Filter.contains('@gmail.com');
  'favorite_food': Filter.notNull(),
  'and': and([
    {'age': Filter.gte(20)},
    {'age': Filter.lte(70)},
  ]),
});

Filters({
  'name': F.eq('John'),
});

Additional info

Constructors

Filters(Map<String, Object?> data)
Set filters.

Properties

data Map<String, Object?>
Filters
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, Object?>
Convert filters to map so it can be passed to Dio.
toString() String
A string representation of this object.
inherited

Operators

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