shortenMapsToItemCount method

void shortenMapsToItemCount({
  1. required int itemCount,
})

Removes all children that have a higher position the itemCount.

Implementation

void shortenMapsToItemCount({required int itemCount}) {
  childrenKeyMap.removeWhere(
    (key, value) => value.originalOrderId >= itemCount,
  );
}