AdService class

Facade for Ad loading and displaying.

This is a Singleton class.

It allows to enable and disable Ad initialization as well as Ad serving.

Constructors

AdService()
factory

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

disableAds() → void
Disables ad initialization and loading.
enableAds() → void
Enables ad initialization and loading.
getBanner({String? adUnitId}) Future<ResponseBanner>
Use the widget AdBanner instead of using this method.
initialize({List<String> bannerIds = const [], List<String> interstitialIds = const [], List<String> interRewardIds = const [], List<String> testDeviceIds = const []}) → void
Initializes and resets this service class. In case of disableAds or kIsWeb the initialization will not complete.
interstitialRewardedShowAdHook({String? adUnitId}) → void
Hook to process the outcome of a a Rewarded Interstital Ad.
interstitialRewardedShowNoAdHook({String? adUnitId}) → void
Hook to process the outcome of a a Rewarded Interstital Ad.
isDisabledProgrammatically() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showInterstitial({String? adUnitId}) Future<ResponseInterstitial>
Returns a ResponseInterstitial which informs about the rewarded dialog.
showInterstitialRewarded(BuildContext context, Widget confirmDialog, {String? adUnitId}) Future<ResponseInterstitialRewarded>
Returns a ResponseInterstitialRewarded which informs about the rewarded dialog.
toString() String
A string representation of this object.
inherited

Operators

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