PosColumn constructor

PosColumn({
  1. String text = '',
  2. Uint8List? textEncoded,
  3. bool containsChinese = false,
  4. int width = 2,
  5. PosStyles styles = const PosStyles.defaults(),
})

Implementation

PosColumn({
  this.text = '',
  this.textEncoded,
  this.containsChinese = false,
  this.width = 2,
  this.styles = const PosStyles.defaults(),
}) {
  if (width < 1 || width > 12) {
    throw Exception('Column width must be between 1..12');
  }
  if (text.isNotEmpty && textEncoded != null && textEncoded!.isNotEmpty) {
    throw Exception(
      'Only one parameter - text or textEncoded - should be passed',
    );
  }
}