removeItem method Null safety
- int index,
- AnimatedRemovedItemBuilder builder,
- {Duration duration = _kDuration}
inherited
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:
- AnimatedRemovedItemBuilder, which describes the arguments to the
builder
argument.
Implementation
void removeItem(int index, AnimatedRemovedItemBuilder builder, { Duration duration = _kDuration }) {
_sliverAnimatedMultiBoxKey.currentState!.removeItem(index, builder, duration: duration);
}