snapshotCurrentChildren method
Returns a deep-copied snapshot of the current tracked child order.
The returned map and lists are detached from the controller's internal state, so callers can safely compare snapshots across sync operations.
Implementation
Map<TKey, List<TKey>> snapshotCurrentChildren() {
return <TKey, List<TKey>>{
for (final entry in _currentChildren.entries)
entry.key: List<TKey>.of(entry.value),
};
}