LastChildCacheManager<Data> constructor

LastChildCacheManager<Data>(
  1. ITreeNode<Data> tree
)

Implementation

LastChildCacheManager(this.tree) : _lastChildMap = <INode, bool>{} {
  {
    _addedNodesSubscription = tree.addedNodes.listen(handleItemChangeEvent);
    _removeNodesSubscription =
        tree.removedNodes.listen(handleItemChangeEvent);
    try {
      _insertNodesSubscription =
          tree.insertedNodes.listen(handleItemChangeEvent);
    } on ActionNotAllowedException catch (_) {}
  }

  indexChildren(tree);
}