compileApp function
Compiles the full currently-supported DSL surface into FFProject.
This pass builds on compileAppDeclarations and currently supports the ShopFlow Milestone A surface:
- components and pages
- page params and local state
- widget tree lowering
- dynamic bindings
- action wiring, including API calls and callback parameters
Implementation
DslCompileResult compileApp(App app, {FFProject? project}) {
final declarations = compileAppDeclarations(app, project: project);
final compiler =
project == null
? _UiCompiler(app, declarations)
: _buildUiCompilerForExistingProject(app, declarations);
compiler.compile();
return DslCompileResult(
project: declarations.project,
enumIdentifiers: declarations.enumIdentifiers,
structIdentifiers: declarations.structIdentifiers,
collectionIdentifiers: declarations.collectionIdentifiers,
tableIdentifiers: declarations.tableIdentifiers,
appStateIdentifiers: declarations.appStateIdentifiers,
constantIdentifiers: declarations.constantIdentifiers,
customFunctionIdentifiers: declarations.customFunctionIdentifiers,
apiGroupIdentifiers: declarations.apiGroupIdentifiers,
componentKeys: Map.unmodifiable(compiler.componentKeys),
pageKeys: Map.unmodifiable(compiler.pageKeys),
);
}