sections method
Section payloads in render order. Excludes sections currently
mid-exit-animation unless includeExiting is true. The live form
is the input shape reorderSections implicitly expects (via the
keys returned by sectionKeys).
Implementation
List<Section> sections({bool includeExiting = false}) {
_checkNotDisposed();
final keys = includeExiting ? _tree.rootKeys : _tree.liveRootKeys;
final out = <Section>[];
for (final k in keys) {
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;
}