0 purchases
d1 terminal plugin
d1_terminal_plugin #
This plugin for D1 Terminal allows you to control the printer and LCD screen.
Platform Support #
This plugin works only on android
Usage #
To use this plugin, add d1_terminal_plugin as a dependency in your pubspec.yaml file
What this package do #
✅ Print text with style
✅ Print qrcode (with style)
✅ Print barcode (with style)
✅ Jump n-lines
✅ Cut paper
✅ Get printer status
✅ Get printer cover status
✅ Open and close LCD screen
✅ Show text on LCD screen
✅ Show QR code on LCD screen
✅ Show Image on LCD screen (url, assets)
✅ Show scan QR code
Example #
Import the library.
import 'package:d1_terminal_plugin/d1_terminal_plugin.dart';
copied to clipboard
Printer #
Print text
D1TerminalPlugin.instance.printText(text: 'Siparişim+');
D1TerminalPlugin.instance.printStart();
copied to clipboard
Print barcode
D1TerminalPlugin.instance.printBarCode(
text: '120102012',
symbology: D1BarcodeCodeSystem.CODABAR,
);
D1TerminalPlugin.instance.printStart();
copied to clipboard
Print qrcode
D1TerminalPlugin.instance.printQRCode(text: 'Siparişim', size: 2, align: D1TextAlign.center);
D1TerminalPlugin.instance.printStart();
copied to clipboard
Cut Paper
D1TerminalPlugin.instance.cutPaper();
copied to clipboard
Get printer status
final result = await D1TerminalPlugin.instance.getPrinterStatus();
copied to clipboard
Get printer cover status
final result = await D1TerminalPlugin.instance.isPrinterCoverOpen();
copied to clipboard
Line feed
D1TerminalPlugin.instance.lineFeed(5);
copied to clipboard
LCD Screen #
Show QR code on LCD screen
D1TerminalPlugin.instance.showText('Hello World', D1TextAlign.start);
copied to clipboard
Scan QR
D1TerminalPlugin.instance.showQRScan.call().then((value) {
debugPrint('QR: $value');
D1TerminalPlugin.instance.showText('QR: $value', D1TextAlign.center);
}).onError((error, stackTrace) {
debugPrint(''Time Out'');
});
copied to clipboard
Open Screen
D1TerminalPlugin.instance.openScreen();
copied to clipboard
Close Screen
D1TerminalPlugin.instance.closeScreen();
copied to clipboard
Show QR Code on LCD screen
D1TerminalPlugin.instance.showQRCode('QR Code'),
copied to clipboard
Show Image asset on LCD screen
D1TerminalPlugin.instance.showImageAsset(imageAsset);
copied to clipboard
Show Image Network on LCD screen
D1TerminalPlugin.instance.showImageUrl(imageUrl);
copied to clipboard
NOTE
You must add support multidex ===> add support multidex
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.