insertItem method

void insertItem(
  1. int index,
  2. {Duration duration = _kDuration}

Insert an item at index and start an animation that will be passed to AnimatedGrid.itemBuilder or AnimatedList.itemBuilder when the item is visible.

This method's semantics are the same as Dart's List.insert method: it increases the length of the list of items by one and shifts all items at or after index towards the end of the list of items.


void insertItem(int index, { Duration duration = _kDuration }) {
  _sliverAnimatedMultiBoxKey.currentState!.insertItem(index, duration: duration);