place method
Places the staying keys in one run of rounded rows, ahead of
trailing rows that close it; a leaving key keeps the place it had.
Implementation
void place(Iterable<K> keys, {int trailing = 0}) {
final staying = keys.where((key) => !isLeaving(key)).toList();
final count = staying.length + trailing;
for (final (index, key) in staying.indexed) {
_positions[key] = ItemPosition.get(index, count);
}
}