generateByViewModel function

Widget generateByViewModel(
  1. BuildContext context,
  2. RenderViewModel renderViewModel
)

Implementation

Widget generateByViewModel(
  BuildContext context,
  RenderViewModel renderViewModel,
) {
  ControllerManager? controllerManager = renderViewModel.context.renderManager.controllerManager;
  var controller = controllerManager.findController(renderViewModel.name);
  if (controller != null) {
    var widget = controller.createWidget(context, renderViewModel);
    return widget;
  }

  return Container();
}