redoLastPoint method

void redoLastPoint()

Restores the last undone point and updates shapes.

Implementation

void redoLastPoint() {
/// This method:
/// - Retrieves the last point from `_undoStack`.
/// - Re-adds it to `_tappedPoints`.
/// - Recreates its marker and adds it to `_markerMap`.
/// - Updates all map shapes (polygons, polylines, midpoints, labels).
/// - Notifies listeners to refresh the UI.
///
/// Safe to call only if `_undoStack` is not empty.
///
  if (_undoStack.isNotEmpty) {
    final restored = _undoStack.removeLast();
    _tappedPoints.add(restored);
    _markerMap[MarkerId(restored.id)] = _createMarker(restored);
    _updateMapShapes();
    notifyListeners();
  }
}