SurfaceContext class

What every surface's reporter needs from the SDK: the emitter, the dwell clock, the current screen and the frequency counts.

Each is read when used, so a reporter can be built before the SDK is initialized.

Constructors

SurfaceContext({required EngageEventEmitter events(), required DwellTracker dwell, required String? currentScreen(), required SDKServices? services()})

Properties

currentScreen → String? Function()
final
dwell → DwellTracker
final
events → EngageEventEmitter
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
services → SDKServices? Function()
final

Methods

impressed(CEPTriggerPayload payload, String campaignKey, EngageAnalyticsEvent viewed) → void
The campaign was seen: counts one show of campaignKey, starts its dwell clock and reports viewed to the CEP and to Digia.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
recordCompleted(String campaignKey) → void
Applies the permanent stop for campaignKey (on "Digia Experience Completed") when its policy opted into stopOn: experienceCompleted.
recordShow(String campaignKey) → void
Records one show of campaignKey (on "Digia Experience Viewed").
toString() → String
A string representation of this object.
inherited

Operators

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