dart:developer supports registering custom extensions. vm_service_client should support communicating with those. Since the parameter and the response schemas (other than the isolate ID) are not known, the API has to be generic. One way to do it is to simply add a sendRequest method to VMIsolateRef that forwards to _scope.sendRequest:
class VMIsolateRef {
...
/// Makes a raw RPC to the VM isolate corresponding to the ID [number].
///
/// [method] must correspond either to a built-in VM service method or to a
/// custom VM service extension installed on the VM isolate.
///
/// [params] are passed to the extension handler and must be serializable to
/// a JSON string.
Future<Map> sendRequest(String method, [Map<String, Object> params]) async {
return _scope.sendRequest(method, params);
}
...
}
dart:developer
supports registering custom extensions.vm_service_client
should support communicating with those. Since the parameter and the response schemas (other than the isolate ID) are not known, the API has to be generic. One way to do it is to simply add asendRequest
method toVMIsolateRef
that forwards to_scope.sendRequest
: