copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
JSONRPCRequest copyWith({
Object? id,
String? method,
Map<String, Object?>? params,
}) =>
JSONRPCRequest.fromJson({
...toJson(),
if (id != null) 'id': $encode(id),
if (method != null) 'method': $encode(method),
if (params != null) 'params': $encode(params),
});