InitializationEvents.callbacks constructor

InitializationEvents.callbacks({
  1. InitializationVoidCallback? onCmpFinishedCallback,
  2. InitializationVoidCallback? onDataFetchFailedCallback,
  3. InitializationVoidCallback? onDataFetchSuccessCallback,
  4. InitializationVoidCallback? onInitializationFinishedCallback,
  5. InitializationVoidCallback? onStartedCMPCallback,
  6. InitializationVoidCallback? onStartedDataFetchCallback,
  7. InitializationVoidCallback? onStartedInitializationCallback,
})

The helper factory constructor, which can be used to listen directly and in-place to specific events without the need to extend, mix, or implement InitializationEvents.

...dart R89SDK.initialize( publisherId: "your-publisher-id", appId: "your-app-id", initializationEvents: InitializationEvents.callbacks(onInitializationFinishedCallback: () {

    }));

...

Implementation

factory InitializationEvents.callbacks({
  InitializationVoidCallback? onCmpFinishedCallback,
  InitializationVoidCallback? onDataFetchFailedCallback,
  InitializationVoidCallback? onDataFetchSuccessCallback,
  InitializationVoidCallback? onInitializationFinishedCallback,
  InitializationVoidCallback? onStartedCMPCallback,
  InitializationVoidCallback? onStartedDataFetchCallback,
  InitializationVoidCallback? onStartedInitializationCallback,
}) =>
    _InitializationEventCallbacks(
        cmpFinishedCallback: onCmpFinishedCallback,
        dataFetchFailedCallback: onDataFetchFailedCallback,
        dataFetchSuccessCallback: onDataFetchSuccessCallback,
        initializationFinishedCallback: onInitializationFinishedCallback,
        startedCMPCallback: onStartedCMPCallback,
        startedDataFetchCallback: onStartedDataFetchCallback,
        startedInitializationCallback: onStartedInitializationCallback);