ConnectionConfig class

How to reach a specific device — transport + address.

Zebra printers (ZT411 …) support all of TCP/WiFi, Bluetooth Classic, Bluetooth LE and USB; this object carries whichever address the chosen transport needs and is passed straight to the native bridge.

Constructors

ConnectionConfig({required DeviceTransport transport, String? host, int port = 9100, String? mac, String? usbId})
const
ConnectionConfig.bluetooth(String mac)
const
ConnectionConfig.bluetoothLe(String mac)
const
ConnectionConfig.fromMap(Map<String, dynamic> map)
Rebuilds a config from its toMap form.
factory
ConnectionConfig.mock()
const
ConnectionConfig.tcp(String host, {int port = 9100})
const
ConnectionConfig.usb(String usbId)
const

Properties

address → String
The human-facing address for whatever transport is in use.
no setter
displayTarget → String
What a message should call this target, e.g. 192.168.1.50:9100 or AC:3F:A4:11:22:33. Errors quote it so a failure names the printer it was actually talking to.
no setter
hashCode → int
The hash code for this object.
no setterinherited
host → String?
TCP/WiFi host or DNS name.
final
mac → String?
Bluetooth Classic / BLE MAC address.
final
port → int
TCP port — Zebra printers default to 9100 (raw).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
transport → DeviceTransport
final
usbId → String?
USB device identifier (resolved via UsbDiscoverer on Android).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toArgs() → Map<String, dynamic>
Flattened for sending across the platform channel.
toMap() → Map<String, dynamic>
Serializable form (same shape as toArgs) for persisting to storage.
toString() → String
A string representation of this object.
inherited

Operators

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