debugSnapshotCurrentChildren method
Snapshots used by the widget's initial-expansion logic (mirrors
the existing public hooks on TreeSyncController).
Implementation
Map<K, List<K>> debugSnapshotCurrentChildren() {
final raw = _sync.snapshotCurrentChildren();
final out = <K, List<K>>{};
for (final entry in raw.entries) {
final parent = entry.key;
if (parent is! SectionKey<K>) {
continue;
}
out[parent.value] = <K>[
for (final c in entry.value)
if (c is ItemKey<K>) c.value,
];
}
return out;
}