isIndexCompoundElement method
Whether the question at index (by default the current one) is
inside a compound container.
Implementation
bool isIndexCompoundElement([FormIndex? index]) {
index ??= _currentFormIndex;
if (event(index) != FormEntryEvent.question) return false;
return captionHierarchy(
index,
).any((caption) => isIndexCompoundContainer(caption.index));
}