msg static method

String msg(
  1. int? code
)

Implementation

static String msg(int? code) {
  String res = "Unknown error";
  switch (code) {
    case SDK_OK:
      res = "Success";
      break;
    case PRN_COVER_OPEN:
      res = "Printer cover open";
      break;
    case PRN_PARAM_ERR:
      res = "Printer params error";
      break;
    case PRN_NO_PAPER:
      res = "Printer no paper";
      break;
    case PRN_OVERHEAT:
      res = "Printer overheat";
      break;
    case PRN_UNKNOWN_ERR:
      res = "Printer unknown error";
      break;
    case PRN_PRINTING:
      res = "Printer is printing";
      break;
    case PRN_NO_NFC:
      res = "Printer no NFC";
      break;
    case PRN_NFC_NO_PAPER:
      res = "Printer NFC no paper";
      break;
    case PRN_LOW_BATTERY:
      res = "Printer low battery";
      break;
    case PRN_LBL_LOCATE_ERR:
      res = "Printer label locate error";
      break;
    case PRN_LBL_DETECT_ERR:
      res = "Printer label detect error";
      break;
    case PRN_LBL_NO_DETECT:
      res = "Printer label not detected";
      break;
  }
  return res;
}