codingdevs / thermal_printer Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
In my opinion, it should be documented in the README why exactly this plugin needs location permissions, and also why the FINE / precise location is required. It is not directly apparent why this permission is needed, which also makes App store submissions (especially Apple) very difficult.
I'm getting following error message. Please fix it in upcoming release
New mutable implicit PendingIntent: pkg=xxx.xxx.xxx=com.flutter_pos_printer.USB_PERMISSION, featureId=null. This will be blocked once the app targets U+ for security reasons.
I've to print laundry garment tag from TSC TTP 244 PRO Barcode Printer . It support TSPL command. Can you please provide me example to print Text + QR code using TSPL command . I have found lib has a method to print image using TSPL command. It support only image input?
Please help me
I think may be related to this: Android 14 enforces the BLUETOOTH_CONNECT permission when calling the BluetoothAdapter getProfileConnectionState() method for apps targeting Android 14 (API level 34) or higher.
This method already required the BLUETOOTH_CONNECT permission, but it was not enforced. Make sure your app declares BLUETOOTH_CONNECT in your app's AndroidManifest.xml file as shown in the following snippet and check that a user has granted the permission before calling getProfileConnectionState.
And maybee we just need the runtime permission.
Hi, thanks for developed this cool library!
I got an issue when I use generator.row
and generator.textLeftRight
to print a row, the leftmost column is not left-aligned properly.
Here is my code:
bytes += _generator.hr(ch: '=');
final receiptNumber = label.receiptNumber;
final shippingTotalWeight = '${label.shippingTotalWeight} kg';
final shippingCost = Formatter.currency(label.shippingCost as int);
bytes += _generator.row([
PosColumn(
text: 'Pengiriman',
width: 6,
),
PosColumn(
text: receiptNumber,
width: 6,
styles: const PosStyles(align: PosAlign.right),
),
]);
bytes += _generator.textLeftRight('Berat', shippingTotalWeight);
bytes += _generator.textLeftRight('Ongkir', shippingCost);
bytes += _generator.hr();bytes += _generator.hr(ch: '=');
Here is my Generator
configuration:
@preResolve
Future<Generator> get generator async => Generator(PaperSize.mm80, await CapabilityProfile.load());
and I used CP1252
global code table.
Is there any way to fix this? Thank you!
Error (Xcode): In /Users/mac/.pub-cache/hosted/pub.dev/thermal_printer-1.0.4/ios/libGSDK.a(BLEConnecter.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/mac/.pub-cache/hosted/pub.dev/thermal_printer-1.0.4/ios/libGSDK.a' for architecture arm64
Hi,
Can anyone tell me how can I check which devices are currently connected?
I can't seem to find anything about it.
When i use generator.row() to print a row, then a number is printed before all columns except the first one.
For example, for a row like below:
bytes += generator.row([
PosColumn(width: 8, text: 'Lemon lime x 5 units', styles: const PosStyles(align: PosAlign.left, codeTable: 'CP1252')),
PosColumn(width: 4, text: 'USD 2.00', styles: const PosStyles(align: PosAlign.right, codeTable: 'CP1252')),
]);
Expected output:
Lemon lime x 5 units USD 2.00
Current output:
Lemon lime x 5 units 2USD 2.00
Here, the number '2' is added to the print. if the alignment of the second column was PosAlign.left then '0' would have been added and if the alignment was PosAlign.center, then '1' would have been added.
Why is the number being added and how can I avoid it?
I am using the thermal_printer
package in Flutter to connect to a Bluetooth printer. When I call the disconnect()
method, the Bluetooth state does not change from "connected" to "disconnected/none".
I have tested this on Android.
Expected behaviour:
The Bluetooth state should change to "disconnected/none" after calling disconnect()
.
**Actual behaviour
:**
The Bluetooth state remains "connected" after calling disconnect()
.
Hello Guys.
I have two printers.. everything is working fine for printer 1 and on the other printer the whole design is messed up.
I have attached the screenshot and code tables.
https://i.postimg.cc/HLS3TJZJ/unnamed.jpg
please help me to fix this issue and make the perfect format for any printer.
Whenever I try to use a Bluetooth printer (weirdly USB as well), I get this error message. I can confirm that the package worked with version 1.0.5
on this same device before. Bluetooth is enabled in the device settings.
In this case, this is what the output looks like when the scan()
method is called.
E/MethodChannel#com.codingdevs.thermal_printer(15934): Failed to handle method call
E/MethodChannel#com.codingdevs.thermal_printer(15934): kotlin.UninitializedPropertyAccessException: lateinit property bluetoothService has not been initialized
E/MethodChannel#com.codingdevs.thermal_printer(15934): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.verifyIsBluetoothIsOn(ThermalPrinterPlugin.kt:307)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.onMethodCall(ThermalPrinterPlugin.kt:212)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at android.os.Handler.handleCallback(Handler.java:959)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at android.os.Looper.loopOnce(Looper.java:232)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at android.os.Looper.loop(Looper.java:317)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at android.app.ActivityThread.main(ActivityThread.java:8516)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/MethodChannel#com.codingdevs.thermal_printer(15934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/flutter (15934): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, lateinit property bluetoothService has not been initialized, null, kotlin.UninitializedPropertyAccessException: lateinit property bluetoothService has not been initialized
E/flutter (15934): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.verifyIsBluetoothIsOn(ThermalPrinterPlugin.kt:307)
E/flutter (15934): at com.codingdevs.thermal_printer.ThermalPrinterPlugin.onMethodCall(ThermalPrinterPlugin.kt:212)
E/flutter (15934): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter (15934): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/flutter (15934): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/flutter (15934): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/flutter (15934): at android.os.Handler.handleCallback(Handler.java:959)
E/flutter (15934): at android.os.Handler.dispatchMessage(Handler.java:100)
E/flutter (15934): at android.os.Looper.loopOnce(Looper.java:232)
E/flutter (15934): at android.os.Looper.loop(Looper.java:317)
E/flutter (15934): at android.app.ActivityThread.main(ActivityThread.java:8516)
E/flutter (15934): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (15934): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/flutter (15934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/flutter (15934): )
E/flutter (15934): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
E/flutter (15934): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:322:18)
E/flutter (15934): <asynchronous suspension>
E/flutter (15934):
The current Dart SDK version is 2.18.6.
Because orderz depends on dart_ping >=9.0.0 which requires SDK version >=3.0.0 <4.0.0, version solving failed.
pub get failed (1; Because orderz depends on dart_ping >=9.0.0 which requires SDK version >=3.0.0 <4.0.0, version solving failed.)
when i testing on android it work normal but not work in ios. it show message please review your connection .
Just add dependency -> build -> error
environment:
sdk: '>=3.2.3 <4.0.0'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.