toggleNode method
Toggles an existing node identified by specified key. This method returns a new list with the specified Node toggled.
Implementation
void toggleNode(Key key) {
final node = findNode(key);
if (node == null) {
return;
}
node.toggleExpand();
notifyListeners();
}