updateTextPosition method

void updateTextPosition(
  1. String id,
  2. double x,
  3. double y, {
  4. double? rotation,
  5. double? scale,
})

Implementation

void updateTextPosition(String id, double x, double y, {double? rotation, double? scale}) {
  final index = _textOverlays.indexWhere((t) => t.id == id);
  if (index != -1) {
    _textOverlays[index].x = x;
    _textOverlays[index].y = y;
    if (rotation != null) _textOverlays[index].rotation = rotation;
    if (scale != null) _textOverlays[index].scale = scale;
  }
}