MonetizationHelper class

Helper class for smart monetization management

Constructors

MonetizationHelper()

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

config MonetizationConfig
getter/setter pair
isSessionLimitReached bool
Check if session ad limit reached
no setter
sessionAdCount int
Get current session ad count
no setter

Static Methods

canShowInterstitial() bool
Check if interstitial ad can be shown based on frequency rules
canShowRewarded() bool
Check if rewarded ad can be shown
resetSession() → void
Reset session counters (call when app starts)
setServerSideVerificationOptions({required String userId, String? customData}) → void
Set server-side verification options for rewarded ads This updates the configuration to include server-side verification Note: For existing loaded ads, you need to reload them to apply new options
showMultipleRewardOptions({required BuildContext context, required dynamic onRewardEarned(String rewardType, int amount), VoidCallback? onAdFailed}) → void
Show multiple reward options dialog
showRewardedAdForType({required BuildContext context, required String rewardType, required dynamic onRewardEarned(String rewardType, int amount), VoidCallback? onAdFailed}) → void
Show specific reward type with custom dialog
showRewardedAdWithDialog({required BuildContext context, required String rewardDescription, required VoidCallback onRewardEarned, VoidCallback? onAdFailed}) → void
Show rewarded ad with user consent dialog
showSmartInterstitial({BuildContext? context, int loaderDuration = 1}) bool
Show interstitial ad with smart frequency management