SignPdfElement.text constructor

SignPdfElement.text({
  1. required String text,
  2. required double x,
  3. required double y,
  4. required double width,
  5. required double height,
  6. double rotation = 0,
  7. double scale = 1,
  8. required int page,
  9. String color = '#000000',
  10. double fontSize = 12,
  11. String fontFamily = 'Arial',
})

Create a text element

Implementation

factory SignPdfElement.text({
  required String text,
  required double x,
  required double y,
  required double width,
  required double height,
  double rotation = 0,
  double scale = 1,
  required int page,
  String color = '#000000',
  double fontSize = 12,
  String fontFamily = 'Arial',
}) {
  return SignPdfElement(
    type: 'text',
    data: text,
    position: {'x': x, 'y': y},
    size: {'width': width, 'height': height},
    rotation: rotation,
    scale: scale,
    page: page,
    color: color,
    fontSize: fontSize,
    fontFamily: fontFamily,
  );
}