BluetoothTransport class
PrinterTransport ueber einen Bluetooth-Drucker.
Verwaltet eine eigene BluetoothDevice-Instanz (adressiert ueber
address) — NICHT den globalen KeckPrinterService._devicePrinter. Beim
ersten send wird bei Bedarf verbunden (Adapter-State abwarten, dann
connect); der eigentliche Byte-Versand nutzt die gemeinsame, in der Praxis
bewaehrte Sendelogik writeToBluetoothDevice (MTU/Chunking/Flow-Control).
- Implemented types
Constructors
- BluetoothTransport({required String address, Duration timeout = const Duration(seconds: 10)})
-
Erzeugt einen Bluetooth-Transport fuer den Drucker mit
address.
Properties
- address → String
-
Bluetooth-Adresse (Remote-ID) des Druckers.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
Timeout fuer das Abwarten des Adapter-States beim Verbinden.
final
Methods
-
dispose(
) → Future< void> -
Trennt die (eigene) Bluetooth-Verbindung, falls verbunden.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
List< int> bytes) → Future<KeckPrintResult> -
Sendet fertige ESC/POS-
bytes. Wirft nicht — das Ergebnis (gesendet oder Fehler) kommt im KeckPrintResult.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited