writeCheckAlwaysChangeDetectionStatements method

List<Statement> writeCheckAlwaysChangeDetectionStatements()

Implementation

List<o.Statement> writeCheckAlwaysChangeDetectionStatements() {
  final methodName = 'detectChangesInCheckAlwaysViews';
  return [
    // `HostView` already has a specialized implementation of this method.
    if (viewType != ViewType.host) ...[
      for (final viewContainer in viewContainers)
        viewContainer.callMethod(methodName, []).toStmt(),
      for (final viewChild in viewChildren)
        if (viewChild.component!.isChangeDetectionLink)
          viewChild.componentView!.callMethod(methodName, []).toStmt(),
    ],
  ];
}