PrinterManager class

Universal printer manager for all platforms Handles BLE and USB printer discovery and operations using universal_ble for all platforms Removes dependency on win_ble and creates a single manager for all platforms

Properties

devicesStream Stream<List<Printer>>
no setter
hashCode int
The hash code for this object.
no setterinherited
isBleTurnedOnStream Stream<bool>
Stream to monitor Bluetooth state
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(Printer device) Future<bool>
Connect to a printer device
disconnect(Printer device) Future<void>
Disconnect from a printer device
dispose() Future<void>
Dispose all resources
getPrinters({Duration refreshDuration = const Duration(seconds: 2), List<ConnectionType> connectionTypes = const [ConnectionType.BLE, ConnectionType.USB], bool androidUsesFineLocation = false}) Future<void>
Get Printers from BT and USB
initialize() Future<void>
Initialize the manager and check BLE availability
isBleTurnedOn() Future<bool>
Check if Bluetooth is turned on
isConnected(Printer device) Future<bool>
Check if a device is connected
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printData(Printer printer, List<int> bytes, {bool longData = false, int? chunkSize}) Future<void>
Print data to printer device
sortDevices() → void
Sort and filter devices
stopScan({bool stopBle = true, bool stopUsb = true}) Future<void>
Optimized stop scanning with better resource cleanup
toString() String
A string representation of this object.
inherited
turnOnBluetooth() Future<void>
Turn on Bluetooth (universal approach)

Operators

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

Static Properties

instance PrinterManager
no setter