EasyAds class

Properties

adIdManager IAdIdManager
latefinal
autoLoadAds bool
latefinal
hashCode int
The hash code for this object.
no setterinherited
onEvent Stream<AdEvent>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showAdBadge bool
On banner, ad badge will appear
no setter

Methods

createBanner({AdSize adSize = AdSize.banner}) EasyAdBase?
Returns EasyAdBase if ad is created successfully. It assumes that you have already assigned banner id in Ad Id Manager
createNativeAd() Widget
Creates a Native Ad Widget for display. Returns a NativeAdWidget if the ID is valid, otherwise a placeholder widget.
destroyAds({AdUnitType? adUnitType}) → void
Do not call this method until unless you want to remove ads entirely from the app. Best user case for this method could be removeAds In app purchase.
initialize(IAdIdManager manager, {bool isShowAppOpenOnAppStateChange = false, AdRequest? adMobAdRequest, RequestConfiguration? admobConfiguration, bool enableLogger = true, bool showAdBadge = false, bool autoLoadAds = true}) Future<void>
Initializes the Google Mobile Ads SDK.
isAppOpenAdLoaded() bool
Returns bool indicating whether ad has been loaded
isInterstitialAdLoaded() bool
Returns bool indicating whether ad has been loaded
isRewardedAdLoaded() bool
Returns bool indicating whether ad has been loaded
loadAd({AdUnitType? adUnitType}) → void
This will load both rewarded and interstitial ads. If a particular ad is already loaded, it will not load it again. Also you do not have to call this method everytime. Ad is automatically loaded after being displayed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showAd(AdUnitType adUnitType, {int loaderDuration = 0, BuildContext? context}) bool
Displays adUnitType ad from adNetwork. It will check if first ad it found from list is loaded, it will be displayed if adNetwork is not mentioned otherwise it will load the ad.
showJitAppOpen({VoidCallback? onFailedToLoadOrShow, VoidCallback? onAdShowed, VoidCallback? onAdDismissed}) Future<void>
Loads and immediately shows a Just-In-Time (JIT) AdMob App Open ad. Call this when you want to display an app open ad on-demand (no preloading).
showJitInterstitial(BuildContext context, {VoidCallback? onFailedToLoadOrShow, VoidCallback? onAdShowed, VoidCallback? onAdDismissed}) Future<void>
Loads and immediately shows a Just-In-Time (JIT) AdMob Interstitial ad. Call this when you want to display an interstitial ad on-demand (no preloading).
showJitRewarded(BuildContext context, {required void onEarnedReward(BuildContext context)}) Future<void>
Loads and immediately shows a Just-In-Time (JIT) AdMob Rewarded ad with optional user prompt. Handles showing loading overlay and success/error dialogs.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance EasyAds
final