Flutter - Bluetooth Printer - Thermal Printer
ฝัง
- เผยแพร่เมื่อ 31 ก.ค. 2024
- In this Video we will learn how to integrate Bluetooth Thermal Printer with Flutter Application.
⏱TIMESTAMPS
00:00 - Video Introduction
00:38 - Packages Used
01:17 - Let`s Start Coding
08:38 - Bluetooth Connectivity
14:50 - Bluetooth Printer Integration
18:22 - Flutter + Bluetooth + Printer + Integration Testing
📄Source Code
Follow us to get Source @ Twitter | Facebook | Instagram | Telegram
📎Flutter Packages
pub.dev/packages/intl
pub.dev/packages/bluetooth_print
🤝Stay Connected with me !
✔ Instagram : / snippetcoder
✔ Facebook : / snippetcoder
✔ Twitter : / snippetcoder
✔ Telegram : t.me/SnippetCoder
✔ Github : github.com/SnippetCoders/
⛄If you like my work , you can support me
☑️Patreon : / snippetcoder
☑️PayPal : www.paypal.me/iSharpeners
☑️DM For UPI Number
PLEASE SUBSCRIBE AND SHARE THIS VIDEO!!!!😳
THANKS FOR WATCHING!!!
🔥🔥🔥 Push Notification with Flutter, WordPress & OneSignal 🔥🔥🔥
• 🔥 Upload Image/Video i...
🔥🔥🔥 Flutter WooCommerce Admin App - EP 01 - Login Page 🔥🔥🔥
• Flutter WooCommerce Ad...
🔥🔥🔥 Make your Flutter app Multilingual in just 20 min 🔥🔥🔥
• 🔥 Make your Flutter ap...
🔥🔥🔥 💰 Monetizing Flutter apps with Google AdMob 💰 🔥🔥🔥
• 💰 Monetizing Flutter a...
🔥🔥🔥 Upload Image/Video in Flutter with Rest API & WordPress 🔥🔥🔥
• 🔥 Upload Image/Video i...
🔥🔥🔥 Login/Logout System in Flutter With Rest API & WordPress 🔥🔥🔥
• 🔥 Login/Logout System ...
🔥🔥🔥THE BEST WAY TO LEARN SQFLITE IN FLUTTER DEVELOPMENT : • The Best way to learn ...
🔥🔥🔥HIVE ❤️ FLUTTER - LIGHTWEIGHT & FAST NOSQL DATABASE 🔥 : • Hive ❤️ Flutter - Ligh...
🔥🔥🔥FLUTTER - GROCERY APP - WORDPRESS - WOOCOMMERCE SERIES : • 🔥 Flutter - Grocery Ap...
🔥🔥🔥FLUTTER NEWS APPLICATION USING GETX AND WORDPRESS CUSTOM API : • Flutter News Applicati...
Tags and SEO Stuff :
#WooCommerceAdminSeries #WooCommerceFlutterApp #SnippetCoder #woocommerceadminpanelforshopmanager #woocommerceadminapp #woocommerceflutterapp #woocommerceflutteradminapp #flutter #flutteradminapp #flutterecommerceappwithadminpanel #flutteradminpanel #flutteradmindashboard #woocommerceadmindashboardplugin #woocommercegroceryapp #woocommerce #woocommercetutorial #woocommerceplugin #woocommercesetup #woocommerceadmin #wordpresstutorial #woocommercesalesreport #woocommerceadminflutter #flutterapp #woocommercecategories
Excelente tutorial muchas gracias, saludos desde Colombia 🇨🇴
Love your channel as usual 🥰🥰🥰🥰🥰
Very awesome 👏🏻
Great tutorial thank's very much
Great tutorial👨🏫📓
This is working for me. Great thanks bro
Glad to hear that
thanks you very much for this video, now I have found my Bluetooth thermal printer by turning on my location as well.
thanks bro you save my life
Thank you very much best video
hi, may i know how to print from the paired printer instead of selecting a printer?
its not working for me. code I write is fine but still cant get a receipt..
For those as me looked for the code i found it here github.com/SnippetCoders/flutter_bluetooth_printer/tree/main and by default the printing is not going to work because await bluetoothPrint.printReceipt(config, list); is missing in the PrintPage code, you just need to add it after the last list.add(..). pub.dev/packages/bluetooth_print
Amazing.
This is amazing 🔥🔥.. thankyou so much. 👍🤘
good video explanation
Hi, nice video. I have a question. This library can be integrated with any bluetooth printer
Have you used Feitian SDK for POS F100
Thanks for another great tutorial. I hope you will extend this Flutter Bluetooth Printer tutorial to select and use data from a database like MySQL. Again thanks!
I will try my best to make one complete POS Series with Flutter and this Thermal Printer 😊
@@SnippetCoder Thank you @snippet coder. We'll wait for your next video.
Did yours work ??
After connecting to bluetooth printer (i have issues in connecting), i only see that linetexts are getting filled up. After bluetooth pritner connection will the code directly print what comes next widget line linetext ?
Thanks for good tutorial
Glad you liked it
Hello,
Good tutorial, How can I do to print horizontally ?
Is it possible to change design of check?
Hi, I can not see my printer, it is a PPT305BT 3nStar. When I try to connect it to my cellphone it asks me for a PIN but in the app I can not see it.
Hola, no puedo ver la impresora, es una PPT305BT de 3nStar. Cuando intento conectarme a ella en el celular me pide un PIN pero en la aplicacion nunca me sale.
Great Tutorial. Appreciated for your work.
I experience a problem now. How to print special characters like ä ü ß? Any idea? In my case it prints Chinese characters be default but I don't know how to fix this.
Anyone know if it is compatible with Zebra printers?
As of today May 09, 2020 Monday. This is not properly working. A glitch on gradle file.
hello sir , thank you very much
isn't there any fix to use this with the null safety ?
Hello I have an error here:error: The operator '*' isn't defined for the type 'Object'.
how to preview receipt on mobile before printing?
How many languages we use to make one app??
Very good video congratulations, I could not print on the DATECS DPP 350 printer
Hello, Can you mention your printer in the printer package github issues?
What about acces on Info.plist?
Cannot search printers. I am using the same printer as you. GOOJPRT PT-210
how to print double text?
este codigo en que momento lo mandas a imprimir?
Map config = Map();
List list = [];
No esta en tu repode git, porfavor ayuda
await bluetoothPrint.printReceipt(config, list);
I have a Web Based POS System using Laravel and I open the Application using a tablet, when I want to print a receipt but it won't print. Is it possible if I deploy a Flutter project to my server and make that flutter project as a service for my web application to detect and print receipts? So the flutter project will take the Receipt content from my web application and it can be printed
You have to check if this printer utility provide the support for web or not.
How can I print 2 texts one on left and the other on right in the same line?
Does it work for you please
My printer seems not support using this package :(
A problem occurred evaluating project ':bluetooth_print'.
> Could not find method compile() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. THIS ERROR HAPPEN MY CODE
Esse erro se resolve modificando o arquivo arquivo 'android/app/build.gradle' na chave android{} e depois achando a chave defaultConfig {} defina o valor 21 em minSdkVersion. android {
...
defaultConfig {
...
minSdkVersion 21
}
}
Tambem tive que alterar o arquivo C:\Users\MeuPerfil\AppData\Local\Pub\Cache\hosted\pub.dev\bluetooth_print-3.0.1\android\build.gradle na linha de dependencias: removi o copile e deixei apenas as linhas de implementation, ficou assim: dependencies {
implementation files('libs/gprintersdkv2.jar')
implementation "androidx.core:core:1.6.0"
//implementation files("D:\\devtools\\flutter\\bin\\cache\\artifacts\\engine\\android-x64\\flutter.jar")
}
Espero que isso te ajude!
Great video! Is it possible to get access to the code?
Sure, checkout our GitHub
I get the following error when i navigate to the print screen,
type '(MethodCall) => Null' is not a subtype of type '((MethodCall) => Future)?' in type cast,
Do you know any way to fix it
I have the same problem
@@renysh are you the one who posted the issue on github?
This issue is bcoz of null safety, I already told in the video this plugin not support null safety
@@SnippetCoder Hello, I present this same error, I already changed to non-null security, but bluetooth devices are not shown, any suggestions?
Have you tried in app debug mode ?
Thank you
but how i can view the result to the user before print ?
I dont think there is any print preview, but you can create your own fake print preview with flutter
it is possible to leave the default printer so that it is not necessary to select the printer each time?
hi did you find a solution to this?
@@backstagewithrahul I haven't had the need yet but when I need it I'll search and find it I'll post it here
Hi, have you found the solution yet? I have been trying to implement it but as there is so little information about this package so it's hard to understand.
@@somestarsoul1064 sorry, a stop my project for a time. Dont implement this
Hello sir printer device connecting but not printing
The app works on my android tablet, but only finds a few devices and not the thermal printer. The tablet can connect to the thermal printer outside the app. I've tried increasing the startScan duration but it doesn't help. Any ideas?
Sometime, bcoz of scan duration timeout issue, put the Refresh button and call scan from there.
@@SnippetCoder Can you elaborate a bit? Do you think it is possible to connect directly using the Bluetooth address of the printer, instead of searching?
@@SnippetCoder I connect with my printer and its connected, but no printing
Is your printer working fine with other applications?
@@SnippetCoder yes perfectly ok, in other its working
Bro somebody telling flutter gives more errors compare to other frameworks it is true or false??
Did you face any errors ? never listen to other always believe in practical :)
@@SnippetCoder ok thanks
I have the same printer, but iphone doesn't detect that...
Hi, it works in Android 10?
Yes, it will please follow the video for the permissions i used in the android manifiest.
The coding is fine, but the receipt is not printed. Please help!!
New Video for the same coming soon.
I just test now but it didn't print text. Any solution?
await bluetoothPrint.printReceipt(config, list); add this at the end
Is there any package for desktop
you should be able to print if you connect the printer through usb port. The normal printer windows from windows should appear. you don't need a library, you just need to create a pdf file.
Excellent video.
How can I get the source code?
Thanks. github.com/SnippetCoders/flutter_bluetooth_printer
i got this error
Exception has occurred. _CastError (type '(MethodCall) => Null' is not a subtype of type '(MethodCall) => Future' in type cast) in blutooth printer.
how can i solve this error
I am facing the same issue. Did you manage to fic the problem?
@@Mary-xi7yv Migrate to nullsafety version but facing problem with the up to date version
estou com o mesmo problema, você conseguiu resolver?
great tutorials bro, but the code gives me error here :
title: Text(_devices[i].name),
subtitle: Text(_devices[i].address),
how could i solve it?
open class BlueToothDevices(ctrl + left click) and remove ? from string and address
title: Text(_devices[i].name.toString()), //Text(_devices[i].name),
subtitle: Text(_devices[i].address.toString()),
Hey, yo connect the device. Very good but where is the code to print. How do you send the print order. And how to use de config dict. Very bad end.
I hope you watch the full video, everything is there :)
@@SnippetCoder you didn’t call the config...
How to print Tamil font in terminal printer
Try something with unicode
Mine keeps on disconnecting after awhile
Did you use the same printer model from the video or another model?
I don't think the whole code is working. You can see the bluetooth devices but can't really print.
I am not sure if it plugin issue which we using or something else.
That is not working if you print with IOS phone. Well in android
Its not woking for me
I cloned your project. It shows the printer but does not print. Where is the problem?
is your printer is getting connected ?
Same problem
same problem, did u find a solution?
@@SugerNoor1996 Did you find the solution?
@@unwantedchild117 I used native android implementation
can you share code
github.com/SnippetCoders/flutter_bluetooth_printer
For those who are wondering why you cant print because he intentionally left this part of the code hidden.
await bluetoothPrint.printReceipt(config, list);
why would i intentionally leave this part ?? do i selling this code ?? this code is open in git also. Please do proper research before pointing someone.
Am getting error " type (MethodCall)=> Null is not a subtype of type ((MethodCall)=>future )? In type cast
ANYONE ELSE GETTING THIS ERROR??
I followed you every step 😂
Pls disable the null safety
Thanks , but I decided to go with other package updated 3days ago
@@leonardkiptala9734
What package did you use with null safety?
i got the same error
@@edwinespinal462 am sorry , I just read this now , so sorry
it is not printing only show bluetooth printers
I got some problem, did you find solution?
@@SugerNoor1996 Same did you find the solution
I Hate this video
Any reason for Hate ?
:p bad video
What bad you find in this video :p
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/6amtech/.pub-cache/hosted/pub.dartlang.org/bluetooth_print-3.0.1/android/build.gradle' line: 37
* What went wrong:
A problem occurred evaluating project ':bluetooth_print'.
> Could not find method compile() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
CAN YOU PLEASE HELP ME
hello anybody encoutered this error...
BluetoothAdapter(26119): getBluetoothService() called with no BluetoothManagerCallback
any answer on that?
Bro I am not sure for latest update for this plugin . Will try to make new video with latest version soon.
Bro I am not sure for latest update for this plugin . Will try to make new video with latest version soon.
getBluetoothService() called with no BluetoothManagerCallback
E/flutter (25217): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: PlatformException(not connect, state not right, null, null)
E/flutter (25217): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:607:7)
E/flutter (25217): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
@snippet coder getting this same error. Please suggest
@@iitbritesh same here, can you please tell me how you solved it? thank you in advance
Same error =(, maybe library is not compatible with the printer model (i'm using Honeywell MPD31D).
I have the same error, and can't print any document
Great video! Is it possible to get access to the code?
Yes Source, Check Description for how to get source code.
@@SnippetCoder thanks, I am following you on Twitter now, what's next?
Drop me DM , I will share the link in few hours.