removeItem method
Remove the item at the given index
Implementation
void removeItem(int index) {
assert(index >= 0 && index < _items.length);
T item = _items.removeAt(index);
_calcItemPeriod();
if (!isCollapsed()) {
_numItemsDisplayed--;
listKey.currentState?.removeItem(
index,
(context, animation) => SizeTransition(
sizeFactor: animation,
child: _builder?.call(context, item, index),
),
duration: _duration,
);
}
}