removeAllItems method
- AnimatedRemovedItemBuilder builder, {
- Duration duration = _kDuration,
inherited
Remove all the items and start an animation that will be passed to
builder when the items are visible.
Items are removed immediately. However, the
items will still appear for duration and during that time
builder must construct its widget as needed.
This method removes all items from the list. Items that are in the process of being inserted will also be removed. Items that are already in the process of being removed will be excluded.
Implementation
void removeAllItems(AnimatedRemovedItemBuilder builder, {Duration duration = _kDuration}) {
assert(_itemsCount >= 0);
assert(_itemsCount - _outgoingItems.length >= 0);
final int visibleItemCount = _itemsCount - _outgoingItems.length;
for (int i = visibleItemCount - 1; i >= 0; i--) {
removeItem(i, builder, duration: duration);
}
}