HDPrinterDevice class
An external printer this device can reach, named by its address — a result of HaloSdkUi.scanForPrinters, and what HaloSdkUi.selectPrinter takes.
Only an external, connect-by-address printer (today a Bluetooth Zebra) is described this way: there may be several, so one is identified by address and shown by name. The built-in MobiPOS printer never is — it is auto-detected and named only by its provider.
Constructors
- HDPrinterDevice({required PrinterProvider provider, required String address, required String name})
-
const
Properties
- address → String
-
The address a connection opens against — a Bluetooth MAC for a Zebra. The
stable identity a selection is keyed on.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The human-readable name to show in a picker — the Bluetooth friendly name
where the device gave one, else the address.
final
- provider → PrinterProvider
-
The make this device is.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
The
{provider, address, name}map the channel carries to the native side for HaloSdkUi.selectPrinter. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromJson(
Map< Object?, Object?> json) → HDPrinterDevice? -
Rebuilds a device from the
{provider, address, name}map the channel carries. Returns null for a shape the two sides disagree on.