redrawShapes method
Redraw all shapes to the annotation canvas.
Implementation
void redrawShapes(List<Map<String, dynamic>> shapes) {
clearAnnotationCanvas();
for (final shape in shapes) {
drawToAnnotationCanvas(
type: shape['type'] as String,
x1: (shape['x1'] as num?)?.toDouble() ?? 0,
y1: (shape['y1'] as num?)?.toDouble() ?? 0,
x2: (shape['x2'] as num?)?.toDouble() ?? 0,
y2: (shape['y2'] as num?)?.toDouble() ?? 0,
color: shape['color'] as String? ?? '#000000',
thickness: (shape['thickness'] as num?)?.toDouble() ?? 2,
freehandPoints: shape['points'] as List<Map<String, dynamic>>?,
);
}
}