ensureInsertedInto method
void
ensureInsertedInto(
- BrownfieldSelection selection,
- DslWidget widget, {
- String? slot,
- int? index,
Inserts widget into the selected parent or slot.
Use slot for named containers like app bars; use index for stable
ordering when appending is not sufficient.
Implementation
void ensureInsertedInto(
BrownfieldSelection selection,
DslWidget widget, {
String? slot,
int? index,
}) {
_validateNamedWidget(widget, operation: 'ensureInsertedInto');
_operations.add(
_InsertIntoSpec(
selection: selection,
widget: widget,
slot: slot,
index: index,
),
);
}