copyWith method
TrayRequestHookResponse<RequestType, ResultType, MetadataType>
copyWith({
- bool? loading,
- bool? fetchMoreLoading,
- MetadataType? metadata,
- ResultType? data,
- TrayRequestError? error,
- RequestType? request,
- UseMakeRequestFetchMethod<
RequestType, ResultType, MetadataType> ? fetch, - Future<
void> refetch()?, - FetchMoreMethodType<
RequestType, ResultType, MetadataType> ? fetchMore,
Implementation
TrayRequestHookResponse<RequestType, ResultType, MetadataType> copyWith({
bool? loading,
bool? fetchMoreLoading,
MetadataType? metadata,
ResultType? data,
TrayRequestError? error,
RequestType? request,
UseMakeRequestFetchMethod<RequestType, ResultType, MetadataType>? fetch,
Future<void> Function(Map<String, String?> overwriteParams)? refetch,
FetchMoreMethodType<RequestType, ResultType, MetadataType>? fetchMore,
}) {
return TrayRequestHookResponse(
refetch: refetch ?? this.refetch,
fetchMore: fetchMore ?? this.fetchMore,
fetch: fetch ?? this.fetch,
request: request ?? this.request,
metadata: metadata ?? this.metadata,
error: error ?? this.error,
loading: loading ?? this.loading,
fetchMoreLoading: fetchMoreLoading ?? this.fetchMoreLoading,
data: data ?? this.data,
);
}