apply method
Applies this operation to the current list.
Modifies current in place and returns the effective operation
(e.g. populated with captured state like removed index).
Implementation
@override
PolylineOp apply(List<InteractivePolyline> list) {
final idx = list.indexWhere((p) => p.key == key);
if (idx < 0) return this;
final removedItem = list.removeAt(idx);
return copyWith(index: idx, removed: removedItem);
}