copyWith method

PingRequest copyWith({
  1. RequestParams? params,
  2. Object? id,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

PingRequest copyWith({
  RequestParams? params,
  Object? id,
}) =>
    PingRequest.fromJson({
      ...toJson(),
      if (params != null) 'params': $encode(params),
      if (id != null) 'id': $encode(id),
    });