PrintColumn.center constructor

PrintColumn.center(
  1. String text,
  2. double x, {
  3. double fontSize = 24,
  4. FontWeight fontWeight = FontWeight.normal,
})

Creates a center-aligned column.

  • text: The text content of the column
  • x: X position (0-576, matching printer width)
  • fontSize: Font size in points
  • fontWeight: Font weight (normal, bold, etc.)

Implementation

factory PrintColumn.center(
  String text,
  double x, {
  double fontSize = 24,
  FontWeight fontWeight = FontWeight.normal,
}) {
  return PrintColumn(
    text: text,
    x: x,
    align: TextAlign.center,
    fontSize: fontSize,
    fontWeight: fontWeight,
  );
}