AdsLoader.fromPlatformCreationParams constructor
AdsLoader.fromPlatformCreationParams(
- PlatformAdsLoaderCreationParams params
Constructs an AdsLoader from creation params for a specific platform.
Below is an example of setting platform-specific creation parameters for iOS and Android:
PlatformAdsLoaderCreationParams params =
const PlatformAdsLoaderCreationParams();
if (InteractiveMediaAdsPlatform.instance is IOSInteractiveMediaAdsPlatform) {
params = IOSAdsLoaderCreationParams
.fromPlatformAdsLoaderCreationParams(
params,
);
} else if (InteractiveMediaAdsPlatform.instance is AndroidInteractiveMediaAdsPlatform) {
params = AndroidAdsLoaderCreationParams
.fromPlatformAdsLoaderCreationParams(
params,
);
}
final AdsLoader loader = AdsLoader.fromPlatformCreationParams(
params,
);
Implementation
AdsLoader.fromPlatformCreationParams(
PlatformAdsLoaderCreationParams params,
) : this.fromPlatform(PlatformAdsLoader(params));