copyWith method
CkResponse<T>
copyWith({
- T? data,
- bool? isSuccess,
- bool? isRequesting,
- String? error,
- dynamic meta,
- dynamic raw,
- CancelToken? cancelToken,
- int? responseCode,
Implementation
CkResponse<T> copyWith({
T? data,
bool? isSuccess,
bool? isRequesting,
String? error,
meta,
raw,
CancelToken? cancelToken,
int? responseCode,
}) {
return CkResponse<T>(
data: data ?? this.data,
raw: raw ?? this.raw,
isRequesting: isRequesting ?? this.isRequesting,
message: error ?? message,
meta: meta ?? this.meta,
cancelToken: cancelToken ?? this.cancelToken,
isSuccess: isSuccess ?? this.isSuccess,
statusCode: responseCode ?? statusCode,
);
}