TransactionCoordinator class

Bridges the Dart MobileReaderSdk.startTransaction flow to the gateway-handoff contract.

What it does.

What it does NOT do.

  • It does not call em-api. It does not call Magensa. It does not decrypt anything. It does not synthesize approvals.
  • It does not modify the native runtime - it consumes whatever the existing platform-channel adapter surfaces.
  • It does not log encrypted payload bytes, KSN values, bearer tokens, PAN, track, CVV, or ARQC values. The wrapped types' toStrings already redact; this layer adds no logging of its own.

Concurrency. One coordinator runs one transaction at a time. A second concurrent runTransaction call resolves immediately as a readerFailed outcome wrapping a ReaderError(transactionInProgress).

Lifecycle. dispose() releases the orchestrator's resources (if any) and cancels the events subscription. The wrapped MobileReaderSdk is owned by the POS and is NOT torn down here.

Constructors

TransactionCoordinator({required MobileReaderSdk sdk, TransactionCoordinatorConfig config = const TransactionCoordinatorConfig()})

Properties

config → TransactionCoordinatorConfig
The active configuration (read-only).
no setter
hashCode → int
The hash code for this object.
no setterinherited
isBusy → bool
Whether a runTransaction call is currently in flight.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel() → Future<void>
Cancel the in-flight transaction (if any).
dispose() → Future<void>
Release coordinator-owned resources. Does NOT dispose the wrapped MobileReaderSdk - the POS owns that.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runTransaction(TransactionRequest request) → Future<TransactionCoordinatorOutcome>
Run one transaction end-to-end.
toString() → String
A string representation of this object.
inherited

Operators

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