receiveFromFrontend method
Implementation
@override
void receiveFromFrontend(int? id, String method, Map<String, dynamic>? params) async {
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':
String? url = params!['url'];
sendToFrontend(id, JSONEncodableMap({
'content': devtoolsService.controller?.getResourceContent(url),
'base64Encoded': false
}));
break;
case 'reload':
sendToFrontend(id, null);
handleReloadPage();
break;
default:
sendToFrontend(id, null);
}
}