configurationNodes<E> function

void configurationNodes<E>(
  1. List<EasyTreeNode<E>> nodes,
  2. EasyTreeConfiguration configuration
)

Implementation

void configurationNodes<E>(
  List<EasyTreeNode<E>> nodes,
  EasyTreeConfiguration configuration,
) {
  List<EasyTreeNode<E>> _nodes = flatTree<E>(nodes);
  _nodes.forEach((node) {
    bool expanded = node.expanded;
    if (configuration.defaultExpandAll) expanded = true;
    if (node.isLeaf) expanded = false;
    node.expanded = expanded;
  });
}