AdHelper class

Helper class for easy ad operations

This class provides static methods for common ad operations with simplified APIs and automatic error handling.

Constructors

AdHelper()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

adsStatus Map<String, bool>
Get ads status
no setter
adStates Map<String, AdState>
Get ad states
no setter
hasAnyAdReady bool
Check if any ad is ready
no setter
interstitialCallCount int
Get current interstitial call count
no setter
loadingStatus Map<String, bool>
Get loading status
no setter
willInterstitialShowNext bool
Check if interstitial will show on next call
no setter

Static Methods

calculateEstimatedRevenue(AdType adType, int adCount) double
Revenue calculation helpers
calculateUserReward(AdType adType, int adCount) double
resetInterstitialCount() → void
Reset interstitial call count
setInterstitialFrequency(int count) → void
Set interstitial show frequency
showInterstitial({VoidCallback? onInterstitialShown, VoidCallback? onAdClosed, VoidCallback? onAdNotReady, VoidCallback? onAdFailedToShow, bool forceShow = false}) bool
Show interstitial ad with custom callbacks and count control
showRewarded({dynamic onRewardEarned(RewardItem)?, VoidCallback? onAdClosed, VoidCallback? onAdNotReady, VoidCallback? onAdFailedToShow}) bool
Show rewarded ad with custom callbacks