Saturday, February 20, 2021

Printing Receipt with Blutetooth Using Flutter

Recently, I bought the bluetooth printer for my sister business. She wants to have receipt everytime clients have done treatment. It's beauty care business. So She needs the customer database and transactions as well. So I made the app first to record all of it. The problem I have is I have never used bluetooth printer before for my projects. Because I don't have one to try.

Fortunately I got one to test the printer. First I need to search the plugin that supports printer bluetooth on Flutter. Because I made the app for iOS and Android. So I need the cross platform framework that is flutter. That I think it's powerful. OK the plugin that I used is esc_pos_bluetooth. It's not easy acuallty to use. Because I have problem using android that I need to fork the repository.

The issue related to android permissions on newest android phone. That the library haven't updated yet, but many people have known the issues. So there are two packages that I fork. It's esc_pos_bluetooth and flutter_bluetooth_basic. I explain what I need these two packages. First with flutter_bluetooth_basic I added two permissions.