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