apply method

  1. @override
OverlayOp apply(
  1. List<InteractiveOverlayImage> list
)
override

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
OverlayOp apply(List<InteractiveOverlayImage> list) {
  final old = list.findByKeyOrNull(key);
  if (old == null) return this;

  final next = _withCorner(old, corner, to);
  list.updateByKey(key, next);
  return this;
}