movePoint method
void
movePoint({})
Implementation
void movePoint({
required Key key,
required int index,
required LatLng from,
required LatLng to,
bool merge = false,
}) {
final p = findByKey(key);
if (p == null) {
debugPrint(
'Warning: Attempted to move point of non-existent polyline with key: $key');
return;
}
perform(
MovePointPolylineOp(key: key, index: index, from: from, to: to),
merge: merge,
);
scheduleAutoSave();
// Note: Generic `update` won't be called automatically unless we used `update`.
// But `PolylineOp.movePoint` updates the list.
// Ideally we should use standard update if possible, but movePoint is granular transaction.
}