InterstitialAdView class

A class to manage and display interstitial ads using platform-specific native views.

This class allows you to show an interstitial ad by invoking native code via a method channel and listen for ad events through an event channel.

Example usage:

final interstitialAdView = InterstitialAdView();
await interstitialAdView.showInterstitialAdView(
  adData: adMap,
  width: 300,
  height: 250,
  alignment: "CENTER",
  onAdClicked: (ad) => print("Ad clicked: $ad"),
  onAdAppeared: (ad, ubid) => print("Ad appeared: $ad, cliUbid: $ubid"),
);

Constructors

InterstitialAdView()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes the current instance by canceling any active event subscriptions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showInterstitialAdView({required BuildContext context, required Map<String, dynamic> adData, int? width, int? height, String? alignment, String? adLabelText, String? adLabelAlignment, int? x, int? y, void onAdClicked(Map? ad)?, void onAdAppeared(Map? ad, String? trackingId)?, required OsmosConfig config}) Future<void>?
Displays the interstitial ad and starts listening for ad events.
toString() String
A string representation of this object.
inherited

Operators

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