getElementForSample method
SourceElement?
getElementForSample(
- CodeSample sample
Find the element that owns a particular sample.
Implementation
SourceElement? getElementForSample(CodeSample sample) {
if (elements == null) {
return null;
}
return elements!.where((SourceElement element) => element.samples.contains(sample)).single;
}