getComponentInfo static method

ComponentInfo getComponentInfo(
  1. BuildContext context,
  2. AppModel app,
  3. List<BodyComponentModel>? componentModels,
  4. Map<String, dynamic>? parameters,
  5. Layout layout,
  6. BackgroundModel? background,
  7. GridViewModel? gridView,
)

Implementation

static ComponentInfo getComponentInfo(
    BuildContext context,
    AppModel app,
    List<BodyComponentModel>? componentModels,
    Map<String, dynamic>? parameters,
/*
    AccessDetermined accessDetermined,
*/
    Layout layout,
    BackgroundModel? background,
    GridViewModel? gridView) {
  if (componentModels == null) throw Exception("componentModels is null");
  var widgets = <Widget>[];
  for (var model in componentModels) {
    var key = GlobalKey();
    var bodyComponent = Decorations.instance().createDecoratedBodyComponent(
        app,
        context,
        key,
        () => Registry.registry()!.component(context, app,
            /*accessDetermined,*/ model.componentName!, model.componentId!,
            key: key, parameters: parameters),
        model)();
    widgets.add(bodyComponent);
  }

  var hasFab = _getFab(widgets);
  return ComponentInfo(componentModels, parameters, widgets, hasFab, layout,
      background, gridView);
}