DigiaCEPPlugin class abstract
Implemented by each CEP plugin package — digia_engage_clevertap,
digia_webengage_plugin, digia_moengage_plugin.
Core calls into this; plugin authors implement it. Core never imports a CEP SDK, and a plugin never holds core internals — only its DigiaCEPHost.
The whole job reduces to three moves: deliver, subscribe, release-on-outcome.
final presentation = host.deliver(trigger);
presentation.onSignal(forwardMarkingToTheCep);
unawaited(presentation.outcome.then((_) => releaseTheCepSlot()));
Extend this, don't implement it. onScreenChanged and trackEvent
carry no-op bodies so a plugin only writes the ones its CEP has — and
Dart's implements takes the interface without those bodies, so it would
force every plugin to write both. Extending also means a later optional
method is an additive change rather than a break, which matters for an SDK
that ships inside someone else's app.
Constructors
Properties
Methods
-
attach(
DigiaCEPHost host) → void -
Called once by
Digia.register(). Store thehostand start listening to the CEP SDK. -
detach(
) → void -
Called by
Digia.unregister(), or when a replacement plugin is registered — after core has settled every presentation this plugin owns withDropReason.pluginDetached/DismissReason.pluginDetached. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onHostInitFailed(
) → void -
Called each time core init fails. Drop the pending buffer with
initialization_failedand stop buffering. Optional — default no-op. -
onHostReady(
) → void - Called each time core becomes READY. Flush the pending buffer here. Optional — the default is a no-op.
-
onScreenChanged(
String screenName) → void - Forwards a screen change to the CEP's own screen tracking. Optional — the default is a no-op.
-
toString(
) → String -
A string representation of this object.
inherited
-
trackEvent(
String eventName, Map< String, dynamic> properties) → void - Receives Digia's rich first-party analytics events, for campaigns this plugin owns only. Optional — the default is a no-op.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited