loadMap method

TreeViewController loadMap({
  1. List<Map<String, dynamic>> list = const [],
})

Loads this controller with data from a Map. This method expects the user to properly update the state

setState((){
  controller = controller.loadMap(map: dataMap);
});

Implementation

TreeViewController loadMap({List<Map<String, dynamic>> list = const []}) {
  List<Node<T>> treeData =
      list.map((Map<String, dynamic> item) => Node<T>.fromMap(item)).toList();
  return TreeViewController(
    children: treeData,
    selectedKey: this.selectedKey,
  );
}