fullContent static method

Future<void> fullContent({
  1. required String content,
  2. String? footerCode,
  3. String? qrData,
  4. int qrWidth = 0,
  5. int qrHeight = 0,
  6. int qrAlignment = 110,
})

Implementation

static Future<void> fullContent({
  required String content,
  bool footerLogo = false,
  String? footerCode,
  String? qrData,
  int qrWidth = 0,
  int qrHeight = 0,
  int qrAlignment = 110,
}) async {
  if (qrData != null && qrWidth == 0) {
    if (qrData.length >= 300)
      qrWidth = 2;
    else if (qrData.length >= 140)
      qrWidth = 3;
    else if (qrData.length >= 50)
      qrWidth = 4;
    else if (qrData.length >= 20)
      qrWidth = 5;
    else
      qrWidth = 6;
  }

  await _channel.invokeMethod('fullContent', {
    "content": content,
    "footerLogo": footerLogo,
    "footerCode": (footerCode ?? "GBB"),
    "qrData": qrData,
    "qrWidth": qrWidth,
    "qrHeight": qrHeight,
    "qrAlignment": qrAlignment,
  });
}