invokeExtension method

Future<Object> invokeExtension(
  1. String method,
  2. [Map<String, String> params]

Invokes the VM service extension RPC named method registered in this isolate.

VM service extensions are registered using the registerExtension method in dart:developer. The method name must be the same as the name passed to registerExtension, which means it must begin with "ext.".

The params are passed to the extension handler.

Returns the extension handler's decoded response.

This is supported as of VM service version 3.1, or Dart SDK version 1.14.


Future<Object> invokeExtension(String method, [Map<String, String> params]) {
  if (!method.startsWith('ext.')) {
    throw new ArgumentError.value(
        method, 'method', 'must begin with "ext." prefix');
  return _scope.sendRequestRaw(method, params);