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