copyWith method
ApiRequest<ResponseType, InnerType>
copyWith({
- String? method,
- String? path,
- String? dataKey,
- String? baseUrl,
- bool? hasPagination,
- Pagination? pagination,
- List<
Extra> ? extra, - int? timeout,
- bool? isMultipart,
- Map<
String, dynamic> ? body, - Map<
String, String> ? headers, - List<
ApiInterceptor> ? interceptors, - ErrorDescription? error,
- String? nestedKey,
- Map<
String, dynamic> ? query,
Implementation
ApiRequest<ResponseType, InnerType> copyWith(
{String? method,
String? path,
String? dataKey,
String? baseUrl,
bool? hasPagination,
Pagination? pagination,
List<Extra>? extra,
int? timeout,
bool? isMultipart,
Map<String, dynamic>? body,
Map<String, String>? headers,
List<ApiInterceptor>? interceptors,
ErrorDescription? error,
String? nestedKey,
Map<String, dynamic>? query}) =>
ApiRequest<ResponseType, InnerType>(
requestId: requestId,
hasPagination: hasPagination ?? this.hasPagination,
headers: headers ?? this.headers,
query: query ?? this.query,
method: method ?? this.method,
dataKey: dataKey ?? this.dataKey,
nestedKey: nestedKey ?? this.nestedKey,
isMultipart: isMultipart ?? this.isMultipart,
path: path ?? this.path,
extra: extra ?? this.extra,
error: error ?? this.error,
timeout: timeout ?? this.timeout,
baseUrl: baseUrl ?? this.baseUrl,
interceptors: [...?interceptors, ...this.interceptors],
body: body ?? this.body);