BluetoothPrinterConnector class

Implemented types

Constructors

BluetoothPrinterConnector({required String address, required bool isBle, String? name})

Properties

address ↔ String
getter/setter pair
currentStatus → Stream<BTStatus>
Gets the current state of the Bluetooth module
no setter
devices ↔ StreamController<String>
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isBle ↔ bool
getter/setter pair
isScanning → Stream<bool>
no setter
name ↔ String?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scanResults → Stream<List<PrinterDevice>>
no setter
status → BTStatus
no setter

Methods

connect(BluetoothPrinterInput model) → Future<bool>
override
destroy() → Future
disconnect({int? delayMs}) → Future<bool>
override
discovery({bool isBle = false, Duration? timeout = const Duration(seconds: 7)}) → Stream<PrinterDevice>
Starts a scan for Bluetooth Low Energy devices Timeout closes the stream after a specified Duration this device is low energy isBle
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(List<int> bytes) → Future<bool>
override
setAddress(String address) → dynamic
setIsBle(bool isBle) → dynamic
setName(String name) → dynamic
startScan({Duration? timeout}) → Future
Start a scan for Bluetooth Low Energy devices
stopScan() → Future
Stops a scan for Bluetooth Low Energy devices
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance → BluetoothPrinterConnector
no setter

Static Methods

discoverPrinters({bool isBle = false}) → DiscoverResult<BluetoothPrinterDevice>