TreeNode<T>.root constructor

TreeNode<T>.root({
  1. T? data,
})

Factory constructor to be used only for root TreeNode

Implementation

factory TreeNode.root({T? data}) => TreeNode(key: INode.ROOT_KEY, data: data)
  ..isLastChild = true
  ..cacheChildIndices();