printBarcode static method
Future<void>
printBarcode({
- required String barcode,
- BarcodeType? type,
- int height = 30,
- int width = 3,
- BarcodeTextPosition textPosition = BarcodeTextPosition.noText,
Prints a barcode
barcode
, barcodeType
must be provided.
height
and width
can be customized.
Defaults are height
= 30 and width
= 3
Implementation
static Future<void> printBarcode(
{required String barcode,
BarcodeType? type,
int height = 30,
int width = 3,
BarcodeTextPosition textPosition = BarcodeTextPosition.noText}) async {
await _channel.invokeMethod("printBarcode", <String, dynamic>{
'barcode': barcode,
"type": type?.value,
'textPosition': textPosition.value,
'width': width,
'height': height,
});
}