1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter Bluetooth Thermal Printer integration

Discussão em 'Mobile' iniciado por Stack, Novembro 8, 2024 às 04:42.

  1. Stack

    Stack Membro Participativo

    I have a flutter food delivery app. Apart from that, I have a separate restaurant app where I accept and decline orders. I have been trying for a long time to be able to do something so that when the restaurant accepts the order, an automatic receipt will come out in a Bluetooth thermal printer. I found a lot of codes but I don't understand how I can enter these codes in an existing project.

    E.g. In lib / view / screens I have the command page screen which is this:

    if(orderModel.orderStatus == 'pending' && (orderModel.orderType == 'take_away'
    || Get.find<SplashController>().configModel.orderConfirmationModel != 'deliveryman')) {
    Get.dialog(ConfirmationDialog(
    icon: Images.warning, title: 'are_you_sure_to_confirm'.tr, description: 'you_want_to_confirm_this_order'.tr,
    onYesPressed: () {
    orderController.updateOrderStatus(orderModel.id, 'confirmed', back: true).then((success) {
    if(success) {
    Get.find<AuthController>().getProfile();
    Get.find<OrderController>().getCurrentOrders();
    }
    });
    },


    I would like here, when the user presses the Confirm button, to enter a code that will send the automatic receipt to the thermal printer via bluetooth. ((onYesPressed))

    I've seen a lot of github, but I don't understand where to add that code. Because that's a new project, but I want to add these codes to my current application. Can someone please explain to me in detail how I should proceed?

    Thank you very much,

    Continue reading...

Compartilhe esta Página