fetchFileUris method
Calls out to the VMService
to lookup package uri to full file path
mappings
Known mappings are cached to avoid asking VmService
redundantly.
isolateId
The id of the isolate that the packageUris
were generated on.
packageUris
List of uris to fetch full file paths for.
Implementation
Future<void> fetchFileUris(String isolateId, List<String> packageUris) async {
if (_packagePathMappings != null) {
final fileUris =
(await _service!.lookupResolvedPackageUris(isolateId, packageUris))
.uris;
// [_packagePathMappings] could have been set to null during the async gap
// so check that it is non-null again here.
if (fileUris != null && _packagePathMappings != null) {
_packagePathMappings!.addMappings(
isolateId: isolateId,
fullPaths: fileUris,
packagePaths: packageUris,
);
}
}
}