receiveFromFrontend method

  1. @override
void receiveFromFrontend(
  1. int? id,
  2. String method,
  3. Map<String, dynamic>? params
)
override

Implementation

@override
void receiveFromFrontend(int? id, String method, Map<String, dynamic>? params) {
  switch (method) {
    case 'startScreencast':
      sendToFrontend(id, null);
      startScreenCast();
      break;
    case 'stopScreencast':
      sendToFrontend(id, null);
      stopScreenCast();
      break;
    case 'screencastFrameAck':
      sendToFrontend(id, null);
      handleScreencastFrameAck(params!);
      break;
    case 'getResourceContent':
      sendToFrontend(id, JSONEncodableMap({
        'content': devTool!.controller!.view.elementManager.controller.bundle!.content,
        'base64Encoded': false
      }));
      break;
    case 'reload':
      sendToFrontend(id, null);
      handleReloadPage();
      break;
    default:
      sendToFrontend(id, null);
  }
}