addItem method

void addItem(
  1. int index
)

Signals that a new item has been added to the list at index. This shift all extents after the index by one and will create new estimated extent for the new item.

Being able to notify the list of an item being added is useful when eagerly precalculating extents.

Implementation

void addItem(int index) {
  assert(_delegate != null, "ListController is not attached.");
  _delegate!.addItem(index);
}