duplicateShape method

UDocShape? duplicateShape(
  1. String id
)

Copies a shape slightly offset and returns the copy.

Implementation

UDocShape? duplicateShape(String id) {
  final UDocShape? shape = shapeById(id);
  if (shape == null) return null;
  final UDocShape copy = shape.translated(const Offset(0.02, 0.02)).placed(copy: true);
  return addShape(copy);
}