posSetPrintWidth static method

Uint8List? posSetPrintWidth(
  1. int width
)

设置打印区域宽度 @param width @return

Implementation

static Uint8List? posSetPrintWidth(int width) {
  if (width < 0 || width > 255) return null;

  try {
    Command.gsW[2] = width % 100;
    Command.gsW[3] = (width / 100) as int;
  } catch (e) {
    debugPrint(e.toString());
  }
  return Uint8List.fromList(Command.gsW);
}