copyWith method

ApiResponse<BodyType, InnerType> copyWith({
  1. int? statusCode,
  2. Object? error,
  3. Map<String, dynamic>? headers,
  4. dynamic bodyString,
  5. BodyType? body,
  6. Pagination? pagination,
  7. Map<String, dynamic>? extra,
  8. ApiRequest<BodyType, InnerType>? request,
})

Implementation

ApiResponse<BodyType, InnerType> copyWith(
        {int? statusCode,
        Object? error,
        Map<String, dynamic>? headers,
        dynamic bodyString,
        BodyType? body,
        Pagination? pagination,
        Map<String, dynamic>? extra,
        ApiRequest<BodyType, InnerType>? request}) =>
    ApiResponse<BodyType, InnerType>(
        bodyString: bodyString ?? this.bodyString,
        statusCode: statusCode ?? this.statusCode,
        pagination: pagination ?? this.pagination,
        headers: headers ?? this.headers,
        body: body ?? this.body,
        error: error ?? this.error,
        extra: extra ?? this.extra,
        request: request ?? this.request);