hooks/use_make_tray_request
library
Functions
-
createHookResponse<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata>({required RequestType request, required UseMakeRequestFetchMethod<RequestType, ResultType, MetadataType> fetch, required Future<void> refetch(Map<String, String?> overwriteParams), required FetchMoreMethodType<RequestType, ResultType, MetadataType> fetchMore, MetadataType? metadata, bool loading = true, bool fetchMoreLoading = false, ResultType? data, TrayRequestError? error})
→ dynamic
-
-
useMakeTrayRequest<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata>(RequestType initialRequest, {Client? client, TrayRequestMock? mock, bool lazyRun = false, FetchTrayDebugLevel? requestDebugLevel = FetchTrayDebugLevel.none})
→ TrayRequestHookResponse<RequestType, ResultType, MetadataType>
-
a simple hook to make an http request
Typedefs
-
FetchMoreMethodType<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata>
= Future<TrayRequestHookResponse<RequestType, ResultType, TrayRequestMetadata>?> Function()
-
-
TrayRequestFetchParser<ResultType>
= ResultType Function(ResultType? oldData, ResultType newData)
-
-
UseMakeRequestFetchMethod<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata>
= Future<TrayRequestHookResponse<RequestType, ResultType, TrayRequestMetadata>?> Function([RequestType? request, TrayRequestFetchParser<ResultType>? fetchParser])
-