findController method

VoltronViewController<RenderViewModel, RenderNode>? findController(
  1. String name, {
  2. bool canFindRootNode = false,
})

Implementation

VoltronViewController? findController(String name, {bool canFindRootNode = false}) {
  if (name == NodeProps.kRootNode && !canFindRootNode) {
    return null;
  }
  var controller = _controllerRegistry.getViewController(name);
  if (controller == null) {
    return _controllerRegistry.getViewController(DivController.kClassName);
  }

  return controller;
}