allSections property

List<Section> get allSections

All section payloads in render order, INCLUDING those currently mid-exit-animation. Escape hatch for callers that need to introspect mid-animation state.

Implementation

List<Section> get allSections {
  _checkNotDisposed();
  final raw = _tree.rootKeys;
  final out = <Section>[];
  for (final k in raw) {
    if (!_assertIsSection(k)) {
      continue;
    }
    final node = _tree.getNodeData(k);
    if (node == null) {
      continue;
    }
    final data = node.data;
    if (data is SectionPayload<Section, Item>) {
      out.add(data.value);
    }
  }
  return out;
}