PrintColumn class

Defines a column in a multi-column receipt format.

This class represents a column of text in a multi-column layout, specifying the text content, position, and formatting options.

Constructors

PrintColumn({required String text, required double x, TextAlign align = TextAlign.left, double fontSize = 24, FontWeight fontWeight = FontWeight.normal, String fontFamily = 'Siemreap', Color color = Colors.black})
Creates a new print column.
const
PrintColumn.center(String text, double x, {double fontSize = 24, FontWeight fontWeight = FontWeight.normal})
Creates a center-aligned column.
factory
PrintColumn.left(String text, double x, {double fontSize = 24, FontWeight fontWeight = FontWeight.normal})
Creates a left-aligned column.
factory
PrintColumn.right(String text, double x, {double fontSize = 24, FontWeight fontWeight = FontWeight.normal})
Creates a right-aligned column.
factory

Properties

align TextAlign
Text alignment within the column.
final
color Color
Text color.
final
fontFamily String
Font family to use.
final
fontSize double
Font size in points.
final
fontWeight FontWeight
Font weight (normal, bold, etc.).
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The text content of the column.
final
x double
X position (0-576, matching printer width).
final

Methods

bold() PrintColumn
Creates a bold version of this column.
copyWith({String? text, double? x, TextAlign? align, double? fontSize, FontWeight? fontWeight, String? fontFamily, Color? color}) PrintColumn
Creates a copy of this column with updated properties.
larger([double increase = 4.0]) PrintColumn
Creates a larger version of this column.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
smaller([double decrease = 4.0]) PrintColumn
Creates a smaller version of this column.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited