outcomes property
Stream<EncorePlacementOutcome>
get
outcomes
Every placement outcome, multicast: each show() resolution — including
the ones that presented nothing — plus cross-launch strict-unlock
verifications.
This is the observation channel, for analytics forwarding and
app-owned state. Control flow belongs at the call site: switch on what
show() returns. Its reason for existing is
EncoreStrictUnlockVerified, which can land on a later launch than the
presentation that produced it.
There is no replay: the native streams buffer nothing for late subscribers, by design, since outcomes can carry user-scoped claim data. Subscribe at startup if you want all of them.
Encore.shared.outcomes.listen((outcome) {
switch (outcome) {
case EncorePlacementPresentation(:final placementId, :final result):
analytics.log('encore_presentation', placementId, result);
case EncoreStrictUnlockVerified(:final transactionId):
entitlements.refresh(transactionId);
}
});
Implementation
Stream<EncorePlacementOutcome> get outcomes => _channel.outcomes;