setInspectorSelection method
Sets WidgetInspectorService.instance.selection to inspectorId
so a subsequent evaluate has selection.currentElement available.
Implementation
@override
Future<void> setInspectorSelection({
required String inspectorId,
required String groupName,
}) async {
try {
await _guard(
() => _vm.service.callServiceExtension(
'ext.flutter.inspector.setSelectionById',
isolateId: flutterIsolateId,
args: InspectorParams.selectionById(inspectorId: inspectorId, groupName: groupName),
),
op: 'setSelectionById',
);
} on RPCError catch (e) {
if (e.code == _kServerErrorCode && _unknownIdPattern.hasMatch('$e')) {
throw RuntimeStaleInspectorIdError(inspectorId, e);
}
rethrow;
}
}