BluetoothPrinterChannel class

A channel-based implementation of BluetoothPrinter interface.

This class communicates with the native platform using method channels to perform Bluetooth printer operations.

Inheritance

Constructors

BluetoothPrinterChannel()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isConnected → Future<bool>
Checks if there is an active connection to a Bluetooth peripheral.
no setteroverride
isScanningStream → Stream<bool>
Stream indicating the scanning status.
no setteroverride
methodChannel → MethodChannel
Method channel for invoking platform-specific methods.
final
peripheralChannel → EventChannel
Event channel for receiving peripheral device updates.
final
peripheralsStream → Stream<List<Peripheral>>
Stream of lists of available Peripheral devices.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scanningChannel → EventChannel
Event channel for receiving scanning status updates.
final
statusChannel → EventChannel
Event channel for receiving printer status updates.
final
statusStream → Stream<PrinterStatus>
Stream of PrinterStatus updates from the printer.
no setteroverride

Methods

connect(String uuid) → Future<void>
Connects to a Bluetooth peripheral with the given uuid.
override
cutPaper() → Future<void>
Sends a command to cut the paper.
override
disconnect() → Future<void>
Disconnects from the currently connected Bluetooth peripheral.
override
isScanning() → Future<bool>
Checks if scanning is in progress.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printBarcode(String content, {PBarcodeType type = PBarcodeType.eab13, PStringEncoding encoding = PStringEncoding.utf8}) → Future<void>
Prints a barcode with the specified content.
override
printImage(String base64Encoded, double width) → Future<void>
Prints an image from a base64 encoded string.
override
printQrCode(String code, {int unitSize = 5, QRErrLevel errLevel = QRErrLevel.L, PStringEncoding encoding = PStringEncoding.utf8}) → Future<void>
Prints a QR code with the given data.
override
printText(String text, {PTextAlign align = PTextAlign.left, PTextAttribute attribute = PTextAttribute.normal, PTextW width = PTextW.w1, PTextH height = PTextH.h1}) → Future<void>
Sends a text to be printed by the printer.
override
startScan() → Future<void>
Starts scanning for Bluetooth peripherals.
override
stopScan() → Future<void>
Stops scanning for Bluetooth peripherals.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited