AdsManagerDelegate.fromPlatformCreationParams constructor

AdsManagerDelegate.fromPlatformCreationParams(
  1. PlatformAdsManagerDelegateCreationParams params
)

Constructs an AdsManagerDelegate from creation params for a specific platform.

Below is an example of setting platform-specific creation parameters for iOS and Android:

PlatformAdsManagerDelegateCreationParams params =
    const PlatformAdsManagerDelegateCreationParams();

if (InteractiveMediaAdsPlatform.instance is IOSInteractiveMediaAdsPlatform) {
  params = IOSAdsManagerDelegateCreationParams
      .fromPlatformAdsManagerDelegateCreationParams(
    params,
  );
} else if (InteractiveMediaAdsPlatform.instance is AndroidInteractiveMediaAdsPlatform) {
  params = AndroidAdsManagerDelegateCreationParams
      .fromPlatformAdsManagerDelegateCreationParams(
    params,
  );
}

final AdsManagerDelegate delegate = AdsManagerDelegate.fromPlatformCreationParams(
  params,
);

Implementation

AdsManagerDelegate.fromPlatformCreationParams(
  PlatformAdsManagerDelegateCreationParams params,
) : this.fromPlatform(PlatformAdsManagerDelegate(params));