failNudgePresentation method
void
failNudgePresentation(
- CEPTriggerPayload payload,
- DropReason reason,
- String detail, {
- Object? error,
A nudge DigiaHost could not present (no navigator, or the present threw): nothing reached the screen, so it leaves the surface and settles as a drop now rather than blocking every later campaign.
Implementation
void failNudgePresentation(
CEPTriggerPayload payload,
DropReason reason,
String detail, {
Object? error,
}) {
_log.e('Dropped — $detail', campaign: payload.campaignKey);
if (error != null) {
_addDropDetail(payload, {'exception_class': '${error.runtimeType}'});
}
clearPendingNudgeDismiss(payload.cepCampaignId);
if (identical(_controller.activePayload, payload)) _controller.dismiss();
_coordinator
.ownerOf(payload)
?.settle(PresentationDropped(reason: reason, detail: detail));
_liveTestContexts[payload.cepCampaignId]?.reportFailed(reason, detail);
}