CollectionModelRestApiQuery class
Builder for creating collection model adapters using REST APIs.
REST APIを利用したコレクションのモデルアダプターを作成するためのビルダー。
- Inheritance
-
- Object
- CollectionModelRestApiBuilder
- CollectionModelRestApiQuery
Constructors
-
CollectionModelRestApiQuery({required FutureOr<
bool> match(ModelAdapterCollectionQuery query), required Uri endpoint(String endpoint, ModelAdapterCollectionQuery query), required FutureOr<Map< onLoaded(ApiResponse response), bool checkError(ApiResponse response)?, FutureOr<String, DynamicMap> >Map< headers(ModelAdapterCollectionQuery query)?})String, String> > -
Builder for creating collection model adapters using REST APIs.
const
Properties
- checkError → bool Function(ApiResponse response)?
-
A function that returns
trueif the response is an error.final - endpoint → Uri Function(String endpoint, ModelAdapterCollectionQuery query)
-
A function that returns the endpoint of the collection.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ FutureOr<
Map< Function(ModelAdapterCollectionQuery query)?String, String> > -
A function that returns the headers.
final
-
match
→ FutureOr<
bool> Function(ModelAdapterCollectionQuery query) -
A function that returns
trueif the query matches.finalinherited -
onLoaded
→ FutureOr<
Map< Function(ApiResponse response)String, DynamicMap> > -
Returns the loaded collection's data.
final
- 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
-
process(
ModelAdapterCollectionQuery query, RestApiModelAdapter adapter) → Future< Map< String, DynamicMap> > -
Describes the actual processing.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited