ReaderEvent class

A single event on the unified MobileReaderSdk.events stream.

One stream carries every reader / transaction signal. Subscribers match on type and read whichever optional payload fields are relevant for that type:

  • readerDiscovered, connecting, connected, disconnected - reader is populated.
  • encryptedPayloadReady - encryptedPayload or arqcPayload is populated (depending on the read path).
  • approved, declined, cancelled, timedOut, failed - result is populated. failed also carries error.
  • displayMessage - message is populated.
  • lowBattery - batteryPercent is populated.

Security: toString() never includes the contents of encryptedPayload, arqcPayload, or the sensitive parts of result.gatewayResponse. Subscribers must not log the full event either; log type and operational fields only.

Constructors

ReaderEvent({required ReaderEventType type, DateTime? timestamp, ReaderDevice? reader, EncryptedReaderPayload? encryptedPayload, ArqcPayload? arqcPayload, TransactionResult? result, String? message, int? batteryPercent, ReaderError? error})
ReaderEvent.fromJson(Map<String, dynamic> json)
factory

Properties

arqcPayload → ArqcPayload?
final
batteryPercent → int?
final
encryptedPayload → EncryptedReaderPayload?
final
error → ReaderError?
final
hashCode → int
The hash code for this object.
no setterinherited
message → String?
final
reader → ReaderDevice?
final
result → TransactionResult?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timestamp → DateTime
final
type → ReaderEventType
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.
inherited