editPage method
Queues rerunnable structural edits against an existing page.
The name must already exist in the target project. The closure only
records intent; selectors resolve later against the latest project
snapshot during compilation, so edits stay stable across repeated runs.
Implementation
void editPage(String name, void Function(BrownfieldWidgetEditor page) build) {
final editor = BrownfieldWidgetEditor._(
scopeKind: _WidgetClassScopeKind.page,
widgetClassName: name,
);
build(editor);
raw((project) => _applyBrownfieldWidgetClassEdit(project, editor));
}