getWidgetFromChildren method

Widget? getWidgetFromChildren(
  1. BuildContext context, {
  2. Map? parentData,
})

Implementation

Widget? getWidgetFromChildren(BuildContext context, {Map? parentData}) {
  final children = ComponentViewState.getData(context)?['children'] as List?;
  if (children != null) {
    if (children.length > 1) {
      return const SizedBox();
    } else if (children.length == 1) {
      return componentFactory.create(children[0], parentData: parentData);
    }
  }
}