AdsManager class

Handles playing ads after they've been received from the server.

Platform-Specific Features

This class contains an underlying implementation provided by the current platform. Once a platform implementation is imported, the examples below can be followed to use features provided by a platform's implementation.

Below is an example of accessing the platform-specific implementation for iOS and Android:

final AdsManager manager = AdsManager();

if (InteractiveMediaAdsPlatform.instance is IOSInteractiveMediaAdsPlatform) {
  final IOSAdsManager iosManager = manager.platform as IOSAdsManager;
} else if (InteractiveMediaAdsPlatform.instance is AndroidInteractiveMediaAdsPlatform) {
  final AndroidAdsManager androidManager =
      manager.platform as AndroidAdsManager;
}

Properties

hashCode int
The hash code for this object.
no setterinherited
platform → PlatformAdsManager
Implementation of PlatformAdsManager for the current platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() Future<void>
Stops the ad and all tracking, then releases all assets that were loaded to play the ad.
discardAdBreak() Future<void>
Discards current ad break and resumes content.
init({AdsRenderingSettings? settings}) Future<void>
Initializes the ad experience using default rendering settings.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() Future<void>
Pauses the current ad.
resume() Future<void>
Resumes the current ad.
setAdsManagerDelegate(AdsManagerDelegate delegate) Future<void>
The AdsManagerDelegate to notify with events during ad playback.
skip() Future<void>
Skips the current ad.
start() Future<void>
Starts playing the ads.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited