getVMService method
Implementation
Future<vm.VmService> getVMService() async {
if (_service != null) {
return _service!;
}
ServiceProtocolInfo info = await Service.getInfo();
String url = info.serverUri.toString();
Uri uri = Uri.parse(url);
Uri socketUri = convertToWebSocketUrl(serviceProtocolUrl: uri);
_service = await vmServiceConnectUri(socketUri.toString());
return _service!;
}