replaceComponentItems function Null safety
Same as setComponentItems but will set items starting from offset
item
Implementation
void replaceComponentItems(String name, dynamic itemsString,
[int index = 0, int offset = 0]) {
List<Map<String, dynamic>> items = parseItems(itemsString);
var elems = getElementsByName(name, index + 1);
if (index < elems.length) {
elems[index].widget?.setState(() {
elems[index]
.widget
?.items
?.replaceRange(offset, offset + items.length, items);
});
}
}