revert method

  1. @override
PolylineOp revert(
  1. List<InteractivePolyline<Object>> list
)
override

Reverts this operation from the current list.

Modifies current in place and returns the operation itself (or reversed op).

Implementation

@override
PolylineOp revert(List<InteractivePolyline> list) {
  final idx = list.indexWhere((p) => p.key == newPolyline.key);
  if (idx >= 0) {
    list[idx] = oldPolyline;
  }
  return this;
}