copyWith<T> method

APIResponse<T> copyWith<T>({
  1. bool? success,
  2. String? message,
  3. int? statusCode,
  4. Map<String, String>? errors,
  5. T? value,
  6. dynamic body,
  7. Map<String, String>? headers,
})

Implementation

APIResponse<T> copyWith<T>({
  bool? success,
  String? message,
  int? statusCode,
  Map<String, String>? errors,
  T? value,
  dynamic body,
  Map<String, String>? headers,
}) => APIResponse<T>(
  success: success ?? this.success,
  message: message ?? this.message,
  statusCode: statusCode ?? this.statusCode,
  errors: errors ?? this.errors,
  value: value ?? this.value as T?,
  body: body ?? this.body,
  headers: headers ?? this.headers,
);