removeItem method

void removeItem(
  1. int index,
  2. AnimatedRemovedItemBuilder builder,
  3. {Duration duration = _kDuration}

Remove the item at index and start an animation that will be passed to builder when the item is visible.

Items are removed immediately. After an item has been removed, its index will no longer be passed to the itemBuilder. However, the item will still appear for duration and during that time builder must construct its widget as needed.

This method's semantics are the same as Dart's List.remove method: it decreases the length of items by one and shifts all items at or before index towards the beginning of the list of items.

See also:


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