createComponentView method

void createComponentView(
  1. Expression componentViewExpr,
  2. Expression componentExpr,
  3. Expression projectedNodes
)

Implementation

void createComponentView(
  o.Expression componentViewExpr,
  o.Expression componentExpr,
  o.Expression projectedNodes,
) {
  final createExpr =
      projectedNodes is o.LiteralArrayExpr && projectedNodes.entries.isEmpty
          ? componentViewExpr.callMethod('create', [componentExpr])
          : componentViewExpr.callMethod('createAndProject', [
              componentExpr,
              projectedNodes,
            ]);
  _createMethod.addStmt(createExpr.toStmt());
}