isIndexCompoundElement method

bool isIndexCompoundElement([
  1. FormIndex? index
])

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));
}