eventListener property
Notifier for CardLink lifecycle and interaction events.
Consolidates various events into a single stream:
- IaCardLinkEvent.willExit: CardLink will close
- IaCardLinkEvent.willStartScanning: NFC scanning is about to start
- IaCardLinkEvent.failedToInitialize: Initialization failed
- IaCardLinkEvent.goToCart: User requested to go to cart
- IaCardLinkEvent.openTermsAndConditions: User requested to view terms
- IaCardLinkEvent.cardSaved: A card was saved
Usage:
eventListener.stream.listen((event) {
switch (event) {
case IaCardLinkEvent.willExit:
// Handle exit
break;
case IaCardLinkEvent.goToCart:
// Navigate to cart
break;
// ... handle other events
}
});
Implementation
StreamController<IaCardLinkEvent> get eventListener;