appendBitmapText method

dynamic appendBitmapText({
  1. required String text,
  2. int? fontSize,
  3. bool diffusion = true,
  4. int? width,
  5. bool bothScale = true,
  6. int? absolutePosition,
  7. StarAlignmentPosition? alignment,
  8. StarBitmapConverterRotation? rotation,
})

Prints an image generated by text text. fontSize sets font text size of image Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation.

Implementation

appendBitmapText({
  required String text,
  int? fontSize,
  bool diffusion = true,
  int? width,
  bool bothScale = true,
  int? absolutePosition,
  StarAlignmentPosition? alignment,
  StarBitmapConverterRotation? rotation,
}) {
  Map<String, dynamic> command = {
    "appendBitmapText": text,
  };
  command['bothScale'] = bothScale;
  command['diffusion'] = diffusion;
  if (fontSize != null) command['fontSize'] = fontSize;
  if (width != null) command['width'] = width;
  if (absolutePosition != null)
    command['absolutePosition'] = absolutePosition;
  if (alignment != null) command['alignment'] = alignment.text;
  if (rotation != null) command['rotation'] = rotation.text;

  this._commands.add(command);
}