ReaderDevice class

A discovered or connected card reader.

The native bridges create instances of this type from platform-specific device descriptors (e.g. a CBPeripheral on iOS, a BluetoothDevice on Android) and the Flutter façade treats them as opaque identifiers.

Multi-vendor fields

The contract is provider-neutral. Every ReaderDevice carries the vendor, optional model name, optional profile, optional granular transport, optional capability flags, and optional driver id ("provider adapter id" in some vendor SDKs). Consumers that only support one vendor today can ignore these fields; consumers that route to multiple vendor adapters key on driverId (or vendor + the matching profile from knownReaderProfiles).

Constructors

ReaderDevice({required String id, String? name, String? serialNumber, String? model, String? modelName, String? firmwareVersion, int? batteryPercent, bool? isCharging, int? rssi, ReaderConnectionType connectionType = ReaderConnectionType.unknown, ReaderVendor vendor = ReaderVendor.unknown, ReaderTransport? transport, ReaderCapability? capabilities, ReaderProfile? profile, String? driverId})
const
ReaderDevice.fromJson(Map<String, dynamic> json)
factory

Properties

batteryPercent → int?
Battery level 0..100, when reported.
final
capabilities → ReaderCapability?
Capability flags advertised by the native driver for this specific device. May be null when the driver has not reported them, in which case POS code can fall back to profile?.capabilities.
final
connectionType → ReaderConnectionType
Legacy coarse-grained transport hint. Prefer transport.
final
driverId → String?
Routing identifier the native vendor-adapter dispatcher uses to dispatch to the right adapter. Stable across discovery / connect for a given device. Also known as providerAdapterId in some vendor SDKs. May be null when the device is generic / unknown; the profile's driverId (when a profile is set) is the same string.
final
firmwareVersion → String?
Firmware version string as reported by the device.
final
hashCode → int
The hash code for this object.
no setteroverride
id → String
Stable identifier for this reader on this host (e.g. a Bluetooth peripheral UUID). Not necessarily globally unique.
final
isCharging → bool?
Whether the reader reports itself as currently charging.
final
model → String?
Vendor-internal raw model identifier (e.g. "tDynamo", "VP3300"). Free-form; use modelName for the friendly display string and profile?.modelCode for the normalized vendor code.
final
modelName → String?
Human-readable model name (e.g. "MagTek DynaFlex II Go"). Falls back to model or name in POS UIs when null.
final
name → String?
Display name reported by the device.
final
profile → ReaderProfile?
Full reader profile when the device matches a known entry in knownReaderProfiles. POS code may treat the device as generic when this is null.
final
rssi → int?
BLE signal strength indicator, when available.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serialNumber → String?
Hardware serial number, when the reader exposes one.
final
transport → ReaderTransport?
Physical transport in use, when known.
final
vendor → ReaderVendor
Vendor of the reader.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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