getSamplesInElements function

Iterable<CodeSample> getSamplesInElements(
  1. Iterable<SourceElement>? elements
)

Implementation

Iterable<CodeSample> getSamplesInElements(Iterable<SourceElement>? elements) {
  return elements
          ?.expand<CodeSample>((SourceElement element) => element.samples) ??
      const <CodeSample>[];
}