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

DigiaCEPPlugin()

Properties

hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable identifier, unique per registration. Convention: the lowercase CEP name — clevertap, webengage, moengage.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

attach(DigiaCEPHost host) → void
Called once by Digia.register(). Store the host and 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 with DropReason.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_failed and 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