createHookResponse<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata> function
dynamic
createHookResponse<RequestType extends TrayRequest, ResultType, MetadataType extends TrayRequestMetadata>({
- required RequestType request,
- required UseMakeRequestFetchMethod<
RequestType, ResultType, MetadataType> fetch, - required Future<
void> refetch(), - required FetchMoreMethodType<
RequestType, ResultType, MetadataType> fetchMore, - MetadataType? metadata,
- bool loading = true,
- bool fetchMoreLoading = false,
- ResultType? data,
- TrayRequestError? error,
Implementation
createHookResponse<RequestType extends TrayRequest, ResultType,
MetadataType extends TrayRequestMetadata>({
required RequestType request,
required UseMakeRequestFetchMethod<RequestType, ResultType, MetadataType>
fetch,
required Future<void> Function(Map<String, String?> overwriteParams) refetch,
required FetchMoreMethodType<RequestType, ResultType, MetadataType> fetchMore,
MetadataType? metadata,
bool loading = true,
bool fetchMoreLoading = false,
ResultType? data,
TrayRequestError? error,
}) {
return TrayRequestHookResponse<RequestType, ResultType, MetadataType>(
refetch: refetch,
fetchMore: fetchMore,
fetch: fetch,
request: request,
metadata: metadata,
error: error,
loading: loading,
fetchMoreLoading: fetchMoreLoading,
data: data,
);
}