Query class

All options that can be passed to and ItemsHandler.readMany.

Every field is optional. It has all properties that can be used to ItemsHandler.readOne, with additional one for things that are only needed when returning multiple items. Filters are separate property, and they are passed as separate named param.

Query(
  limit: 5,
  offset: 3,
  fields: ['id', 'name'],
  sort: ['name'],
);
Inheritance

Constructors

Query({int? limit, int? offset, List<String>? sort, Meta? meta, Map<String, Query>? deep, List<String>? fields, Map<String, Object?>? customParams})
Custom url params Constructor for query. All fields are optional.

Properties

customParams Map<String, Object?>?
Custom url params.
getter/setter pairinherited
deep Map<String, Query>?
deep is used to apply any of the other query params to nested data sets.
getter/setter pairinherited
fields List<String>?
List of all fields that should be returned.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
limit int?
Limit amount of items to be returned.
getter/setter pair
meta Meta?
Metadata returns additional info about the query.
getter/setter pair
offset int?
Offset items to be returned.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sort List<String>?
List of fields used to sort the fetched items.
getter/setter pair

Methods

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

Operators

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