SliderAdView class

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

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

Example usage:

final sliderAdView = SliderAdView();
await sliderAdView.showSliderAdView(
  adData: adMap,
  width: 300,
  height: 250,
  onAdClicked: (ad) => print("Ad clicked: $ad"),
  onAdAppeared: (ad, trackingId) => print("Ad appeared: $ad, trackingId: $trackingId"),
);

Constructors

SliderAdView()

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.
hideSlider() Future<void>
Hides the currently displayed slider ad.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resumeSlider() Future<void>
Resumes the currently displayed slider ad.
showSliderAdView({required BuildContext context, required Map<String, dynamic> adData, int? width, int? height, int? x, int? y, String? adLabelText, String? adLabelAlignment, void onAdClicked(Map? ad)?, void onAdAppeared(Map? ad, String? trackingId)?, required OsmosConfig config}) Future<void>?
Displays the slider 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