open_cdp_flutter_sdk library
Classes
- CDPInAppManager
- Manages fetching, arbitration, display dispatch and tracking for in-app messages. Designed to be initialized once per SDK instance.
- CDPPushAction
-
A push action button delivered in the FCM
data.actionsJSON string. - CustomerIoConfig
- Customer.io configuration
- InAppArbitrationState
-
Public-shape mirror of the private
_DeliveryStateused so pure arbitration filtering can be tested without standing up the full manager. Marked@visibleForTestingbecause the production code never constructs these directly — they're built from_deliveryStateinside_arbitrate. - InAppConfig
- InAppCta
- A call-to-action button on an in-app message.
- InAppManagerConfig
- Configuration for the in-app delivery manager.
- InAppMessage
- A message returned by the in-app sync endpoint.
- InAppPersistence
- Persistence rules for an in-app message (max impressions, intervals, etc.).
- OpenCDPConfig
- Main configuration class for Open CDP SDK
- OpenCDPPushPayload
-
Helpers for push notification v2 payloads (
custom_data,actions,image_url). - OpenCDPPushSetupOptions
- Options for OpenCDPSDK.setupPushNotifications.
- OpenCDPSDK
- Main SDK class for Open CDP
- PushConfig
- PushConfigAndroid
Enums
- CioLogLevel
- Enum to define the log levels. Logs can be viewed in Xcode or Android studio.
- InAppCtaAction
- Action performed when a CTA is tapped.
- InAppDismissReason
- Reason a message was dismissed.
- InAppRenderType
-
Render type for an in-app message (matches backend
render_type). - MetricEvent
- Enum representing different types of metric events for push notifications
- OpenCDPLogLevel
- Log level for SDK debugging
- PushClickBehaviorAndroid
- Enum to specify the type of metric for tracking Enum to specify the click behavior of push notification for Android
- Region
- ScreenView
- Screen view tracking configuration
Functions
-
isHybridFcmMessage(
RemoteMessage message) → bool -
Whether the FCM message includes a top-level
notificationblock (hybrid payload). -
shouldDisplayAndroidPush(
Map< String, dynamic> data) → bool - Whether the payload should trigger a local Android notification display.
Typedefs
- InAppMessageListener = void Function(InAppMessage message)
- Listener invoked when a new in-app message is ready to be displayed by the host app. The host is responsible for actually rendering it (modal, banner, inline, inbox card, etc.) — the SDK only schedules and tracks it.
-
OpenCDPFirebaseInitializer
= Future<
void> Function() - Initializes Firebase in the background FCM isolate.
-
OpenCDPPushOpenCallback
= void Function(Map<
String, dynamic> data, {String? actionClicked}) - Callback when the user opens a push notification or taps an action button.
-
OpenCDPPushTokenCallback
= FutureOr<
void> Function(String token) - Callback when a new FCM device token is available.
Exceptions / Errors
- CDPException
- Custom exception for CDP API errors.
- CDPValidationException
- Custom exception class for validation errors in the CDP SDK.