toJson method
Encodes this value to its wire object.
Implementation
Map<String, Object?> toJson() {
final result = <String, Object?>{};
result['method'] = method;
if (params != null) {
result['params'] = cancelRequestNotificationCodec.encode(params!);
}
return result;
}