copyWith method

ModelAdapterDocumentQuery copyWith({
  1. Map<String, String>? headers,
  2. String? method,
})

Change headers or method and copy.

Copied objects are recognized as the same object.

headersもしくはmethodを変更してコピーします。

コピーされたオブジェクトは同一オブジェクトとして認識されます。

Implementation

ModelAdapterDocumentQuery copyWith({
  Map<String, String>? headers,
  String? method,
}) {
  return ModelAdapterDocumentQuery(
    query: query,
    listen: listen,
    origin: origin,
    callback: callback,
    headers: headers ?? this.headers,
    method: method ?? this.method,
  );
}