andresperezmelo / print_bluetooth_thermal

Plugin para enviar bytes sin procesar a la impresora solo por ahora para Android
Other
27 stars 36 forks source link

flutter: capabilities.length is already loaded #55

Open adarshwebcastle opened 3 weeks ago

adarshwebcastle commented 3 weeks ago

When printing on iOS, this error is displayed:

flutter: capabilities.length is already loaded

This error occurs because the result variable doesn't contain any data, making it difficult to determine if the print operation was successful.

try {
        List<int> ticket = await generateKOT();
        result = await PrintBluetoothThermal.writeBytes(ticket);
       // the below code below won't execute due to this error.
        if (result) {
          showToast("Token generated successfully");
        } else {
          showToast(
              "Token generation failed, Please check the printer connection and try again");
        }
      } catch (e) {
        print("print test error: $e");
}