removeOrphanNodes method
- @protected
- @visibleForTesting
Removes orphan nodes (i.e. nodes without edges)
Implementation
@protected
@visibleForTesting
void removeOrphanNodes() {
final orphanEntries = {...toMap()}.entries.where((e) => e.value.isEmpty);
for (final e in orphanEntries) {
_removeNode(e.key);
}
}