callDevToolsProtocolMethod method

Future callDevToolsProtocolMethod({
  1. required String methodName,
  2. Map<String, dynamic>? parameters,
})

Runs an asynchronous DevToolsProtocol method.

For more information about available methods, navigate to DevTools Protocol Viewer. The methodName parameter is the full name of the method in the {domain}.{method} format. The parameters will be a JSON formatted string containing the parameters for the corresponding method. This function throws an error if the methodName is unknown or the parameters has an error. In the case of such an error, the parameters parameter of the handler will include information about the error. Note even though WebView dispatches the CDP messages in the order called, CDP method calls may be processed out of order. If you require CDP methods to run in a particular order, you should wait for the previous method's completed handler to run before calling the next method.

Officially Supported Platforms/Implementations:

Implementation

Future<dynamic> callDevToolsProtocolMethod(
        {required String methodName, Map<String, dynamic>? parameters}) =>
    platform.callDevToolsProtocolMethod(
        methodName: methodName, parameters: parameters);