compileDslWidgetForExistingWidgetClass function
Compiles a standalone DSL widget against an existing page/component context.
This is used by the brownfield edit DSL so inserted and replacement widgets reuse the same lowering path as greenfield DSL compilation.
Implementation
FFNode compileDslWidgetForExistingWidgetClass(
FFProject project, {
required String widgetClassName,
required DslWidget widget,
}) {
final context = _buildExistingWidgetClassCompileContext(
project,
widgetClassName: widgetClassName,
);
return context.compiler.compileWidget(widget, context.baseEnv);
}