fetchPackageUris method
Calls out to the VmService
to lookup unknown full file path to package uri mappings.
Known mappings are cached to avoid asking VmService
redundantly.
isolateId
The id of the isolate that the uris
were generated on.
uris
List of uris to fetch package uris for.
Implementation
Future<void> fetchPackageUris(String isolateId, List<String> uris) async {
if (uris.isEmpty) return;
if (_packagePathMappings != null) {
final packageUris =
(await _service!.lookupPackageUris(isolateId, uris)).uris;
if (packageUris != null) {
_packagePathMappings!.addMappings(
isolateId: isolateId,
fullPaths: uris,
packagePaths: packageUris,
);
}
}
}