DigiaInstance class
Internal singleton that backs the public Digia static facade.
This is an implementation detail of the SDK. App developers never see or reference this class — all calls flow through Digia.
- Implemented types
- Mixed-in types
Properties
- anchorRegistry → AnchorRegistry
-
no setter
- controller → DigiaOverlayController
-
Controller for inline campaigns, notifies when they change.
Exposed so DigiaHost can subscribe at mount time.
no setter
- events → EngageEventEmitter
-
Experience-event emitter used by render surfaces (DigiaSlot,
DigiaHost, nudge widgets) to route lifecycle events to CEP and/or Digia.
no setter
- guideManager → GuideShowcaseManager
-
no setter
- guideOrchestrator → GuideOrchestrator
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdkState → SDKState
-
no setter
- surveyOrchestrator → SurveyOrchestrator
-
no setter
Methods
-
campaignForKey(
String campaignKey) → CampaignModel? -
Looks up a cached campaign by its
campaignKey. Used by inline surfaces to attach campaign context to their actions (the same id analytics reports). -
clearUserId(
) → Future< void> -
didChangeAccessibilityFeatures(
) → void -
Called when the system changes the set of currently active accessibility
features.
inherited
-
didChangeAppLifecycleState(
AppLifecycleState state) → void -
Called when the system puts the app in the background or returns
the app to the foreground.
override
-
didChangeLocales(
List< Locale> ? locales) → void -
Called when the system tells the app that the user's locale has
changed. For example, if the user changes the system language
settings.
inherited
-
didChangeMetrics(
) → void -
Called when the application's dimensions change. For example,
when a phone is rotated.
inherited
-
didChangePlatformBrightness(
) → void -
Called when the platform brightness changes.
inherited
-
didChangeTextScaleFactor(
) → void -
Called when the platform's text scale factor changes.
inherited
-
didChangeViewFocus(
ViewFocusEvent event) → void -
Called whenever the PlatformDispatcher receives a notification that the
focus state on a view has changed.
inherited
-
didHaveMemoryPressure(
) → void -
Called when the system is running low on memory.
inherited
-
didPopRoute(
) → Future< bool> -
Called when the system tells the app to pop the current route, such as
after a system back button press or back gesture.
inherited
-
didPushRoute(
String route) → Future< bool> -
Called when the host tells the application to push a new route onto the
navigator.
inherited
-
didPushRouteInformation(
RouteInformation routeInformation) → Future< bool> -
Called when the host tells the application to push a new
RouteInformation and a restoration state onto the router.
inherited
-
didRequestAppExit(
) → Future< AppExitResponse> -
Called when a request is received from the system to exit the application.
inherited
-
flushAnalytics(
) → Future< void> -
getAnonymousId(
) → String -
getInlineCampaign(
String placementKey) → CEPTriggerPayload? - Gets the active inline campaign for a given placement key, if any.
-
handleCancelBackGesture(
) → void -
Called when a predictive back gesture is canceled, indicating that no
navigation should occur.
inherited
-
handleCommitBackGesture(
) → void -
Called when a predictive back gesture is finished successfully, indicating
that the current route should be popped.
inherited
-
handleStartBackGesture(
PredictiveBackEvent backEvent) → bool -
Called at the start of a predictive back gesture.
inherited
-
handleStatusBarTap(
) → void -
Called when the user taps the status bar on iOS, to scroll a scroll
view to the top.
inherited
-
handleUpdateBackGestureProgress(
PredictiveBackEvent backEvent) → void -
Called when a predictive back gesture moves.
inherited
-
initialize(
DigiaConfig config) → Future< void> -
markNudgeDismissed(
CEPTriggerPayload payload) → void - Fired when the nudge is dismissed — by the user or programmatically.
-
markSurveyCompleted(
Map< String, dynamic> response, [Map<String, SurveyAnswer> answers = const {}]) → void - Reports completion and clears the active survey.
-
markSurveyDismissed(
{int? abandonedAtItem, int? answeredCount}) → void -
Clears the active survey after the user closes the result page.
Fired when the user closes the survey without completing it.
abandonedAtItemis the 1-based question they were on;answeredCountis how many they had answered. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCampaignInvalidated(
String campaignId) → void -
Called when a previously delivered campaign is no longer valid.
Digia dismisses the active nudge or inline payload with matching id.
override
-
onCampaignTriggered(
CEPTriggerPayload payload) → bool -
Called when the CEP has evaluated a campaign and it is ready to render.
Digia routes the payload to nudge or inline surfaces based on campaignKey.
override
-
onHostMounted(
) → void - Called by DigiaHost when it mounts into the widget tree.
-
onHostUnmounted(
) → void - Called by DigiaHost when it is removed from the widget tree.
-
register(
DigiaCEPPlugin plugin) → void -
reportCarouselStepClicked(
CEPTriggerPayload payload, {required int itemIndex, String? actionUrl}) → void - A carousel item (or its CTA) was tapped. The first item tap also counts as an experience-level engagement click (once, deduped).
-
reportCarouselStepViewed(
CEPTriggerPayload payload, {required int itemIndex, required int itemTotal, required bool auto}) → void -
A carousel item scrolled into view.
auto= autoplay advance vs manual swipe.itemIndexis 1-based. -
reportNudgeClicked(
CEPTriggerPayload payload, {String? elementId, String? ctaLabel, String? actionType, String? actionUrl, String? ctaRole}) → void -
Fired when the user taps a nudge CTA. A primary CTA tap is the nudge's
CEP engagement signal and emits ExperienceClicked on the coarse channel;
secondary taps stay Digia-only.
time_to_action_msis the dwell so far (nudge still open). -
reportNudgeImpression(
CEPTriggerPayload payload, NudgeConfig config) → void - Fired once when the nudge first becomes visible (its impression).
-
reportSlotFirstRender(
CEPTriggerPayload payload) → void - Fired when an inline slot first paints. Records the deduped Digia impression as a CarouselViewed or StoriesViewed depending on the campaign type. Mirrors Android's reportSlotFirstRender.
-
reportStoryCompleted(
CEPTriggerPayload payload, {required int itemTotal, int? timeToCompleteMs}) → void -
Last story frame viewed.
itemTotal= frames viewed;timeToCompleteMsfrom open. -
reportStoryOpened(
CEPTriggerPayload payload) → void - A story was opened (ring/thumbnail tapped) — drives open rate.
-
reportStoryStepClicked(
CEPTriggerPayload payload, {required int itemIndex, String? ctaLabel, String? actionType, String? actionUrl}) → void - A CTA inside a story frame was tapped.
-
reportStoryStepDismissed(
CEPTriggerPayload payload, {required int itemIndex}) → void -
Story closed before the last frame.
itemIndexis the 1-based frame on close. -
reportStoryStepViewed(
CEPTriggerPayload payload, {required int itemIndex, required int itemTotal}) → void -
A story frame became visible.
itemIndexis 1-based;itemTotal= frames in this story. -
reportSurveyAnswered(
String stepId, Map< String, dynamic> answer) → void -
Fired after a question (any block other than welcome) is answered.
stepIdidentifies the node. First-party Digia analytics only. -
reportSurveyCompleted(
Map< String, dynamic> response, [Map<String, SurveyAnswer> answers = const {}]) → void -
Fired once when the survey finishes (idempotent per showing). Beyond the
Completedanalytics event,answers(when supplied) are POSTed to the backend'srecordSubmissionendpoint via SubmissionReporter. -
reportSurveyQuestionSkipped(
String nodeId, int itemIndex) → void - Fired when the user advances past an unanswered, optional question. First-party Digia analytics only.
-
reportSurveyQuestionViewed(
String nodeId, int itemIndex) → void -
Fired when a (non-content) question becomes visible.
itemIndexis the 1-based respondent traversal depth. Stamps the view time fortime_to_answer_ms. First-party Digia analytics only. -
reportSurveyStarted(
) → void - Fired once when the survey first becomes visible (its impression).
-
reportWelcomeCtaClicked(
) → void -
Fired for the survey's single
Clickedengagement signal — on the welcome screen's start CTA, or on the first question's CTA when the welcome screen is hidden. Idempotent per showing. First-party Digia analytics only. -
resolveActiveCampaign(
) → CampaignModel? - Resolves the CampaignModel for the active payload so DigiaHost can switch on its config type and present the correct experience. Returns null (and auto-dismisses) when no matching campaign is found.
-
setCurrentScreen(
String name) → void -
setUserId(
String userId) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DigiaInstance
-
Internal accessor used only by Digia and DigiaHost.
no setter