addComponentItems function Null safety

void addComponentItems(
  1. String name,
  2. dynamic itemsString,
  3. [int index = 0]
)

Same as setComponentItems but it will append items to the end of the ListView

Implementation

void addComponentItems(String name, dynamic itemsString, [int index = 0]) {
  List<Map<String, dynamic>> items = parseItems(itemsString);
  var elems = getElementsByName(name, index + 1);
  if (index < elems.length) {
    elems[index].widget?.setState(() {
      for (var i = 0; i < items.length; i++) {
        elems[index].widget?.items?.add(items[i]);
      }
    });
  }
}