rootController property
NodeController
get
rootController
Get the controller for the root node. If null will be initialized according to the data
Implementation
NodeController get rootController {
if (_rootController == null) {
_rootController = NodeController(
parent: _rootController,
expandCallback: (dynamic item) {
return true;
});
int num = data!.length;
List<int> indexes = [];
for (int i = 0; i < num; i++) {
indexes.add(i);
}
var controllers = createNodeController(_rootController!, indexes);
_rootController!.insertChildControllers(controllers, indexes);
}
return _rootController!;
}