colada_sdk library

Colada Flutter SDK — mobile attribution and event tracking.

This package is a bridge over the native Colada Android and iOS SDKs. It is the single public entry point; everything under src/ is private and must never be imported directly.

Start with Colada, the facade you call for everything.

await Colada.initialize(
  const ColadaConfig(
    publicTenantKey: String.fromEnvironment('COLADA_TENANT_KEY'),
  ),
);
await Colada.setUser(user.id);
await Colada.track(const Purchase(
  amount: 49.99,
  currency: 'SAR',
  orderId: 'ORD-123',
));

Classes

AddToCart
Fire when a user adds an item to their cart.
Colada
The Colada SDK. This is the only type you call.
ColadaAttribution
The campaign Colada resolved for this install or re-engagement.
ColadaConfig
Configuration passed once to Colada.initialize.
Where to send a user on first open, when the campaign that drove their install specified a destination.
ColadaEvent
A user-lifecycle event reported to Colada, which forwards it to the correct ad platform.
ColadaLogRecord
One diagnostic message from the SDK.
CompleteRegistration
Fire immediately after a user successfully creates an account.
InitiateCheckout
Fire when a user starts the checkout flow, before payment.
Login
Fire when a user actually authenticates.
PlaceAnOrder
Fire when a user submits an order, before payment is confirmed.
Purchase
Fire after a payment has successfully completed — not when it is initiated.
RawEvent
Escape hatch for an event the backend supports but this SDK version does not yet model, so a new backend event does not require an SDK release to use.
Fire when a user performs a search within the app.
Subscribe
Fire when a subscription is activated.
ViewContent
Fire when a user views a product, store page, or menu item.

Enums

ColadaLogLevel
Severity of a ColadaLogRecord.
ColadaMatchMethod
Which strategy resolved an attribution, with the accuracy Colada's backend reports for each.

Exceptions / Errors

ColadaBackendRejectedException
The backend rejected the request and retrying cannot help.
ColadaDeliveryFailedException
Delivery was attempted and retried, and every attempt failed.
ColadaDeviceIdentityUnavailableException
The device identity could not be read from secure storage.
ColadaException
Base type for every error reported by the Colada SDK.
ColadaInvalidConfigException
The configuration passed to initialize cannot be used.
ColadaInvalidEventException
An event could not be built or is missing a required field.
ColadaMissingUserException
An event was tracked before the user was identified.
ColadaNetworkException
The request could not reach the backend at all.
ColadaNotInitializedException
A method was called before Colada.initialize completed.
ColadaTokenExpiredException
The SDK session token expired and could not be renewed.
ColadaTrackingBlockedException
The OS blocked the request on privacy grounds.
ColadaUnsupportedException
The requested capability does not exist on this platform.