copyWith method

ClientCapabilitiesSampling copyWith({
  1. Map<String, Object?>? context,
  2. Map<String, Object?>? tools,
})

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

Implementation

ClientCapabilitiesSampling copyWith({
  Map<String, Object?>? context,
  Map<String, Object?>? tools,
}) =>
    ClientCapabilitiesSampling.fromJson({
      ...toJson(),
      if (context != null) 'context': $encode(context),
      if (tools != null) 'tools': $encode(tools),
    });