AdsConfig class

Constructors

AdsConfig({PlatformAdIds? directInterstitialIds, bool directInterstitialEnabled = true, PlatformAdIds? bannerIds, PlatformAdIds? interstitialIds, PlatformAdIds? nativeIds, PlatformAdIds? appOpenIds, PlatformAdIds? rewardedIds, bool bannerEnabled = true, bool interstitialEnabled = true, bool nativeEnabled = false, bool appOpenEnabled = true, bool rewardedEnabled = true, bool adsEnabled = true, int interstitialAfter = 2, int maxRetryAttempts = 2, Duration retryBaseDelay = const Duration(seconds: 10), bool preloadEnabled = true, Duration connectivityRecheckInterval = const Duration(minutes: 3)})
const

Properties

adsEnabled → bool
Global kill switch
final
appOpenEnabled → bool
final
appOpenIds → PlatformAdIds?
final
availableAdTypes → Set<AdType>
Returns the set of ad types that have valid keys AND are enabled
no setter
bannerEnabled → bool
Enable/disable flags per ad type
final
bannerIds → PlatformAdIds?
final
connectivityRecheckInterval → Duration
Connectivity settings
final
directInterstitialEnabled → bool
final
directInterstitialIds → PlatformAdIds?
Ad Unit IDs — ALL OPTIONAL. Pass only what you have.
final
hashCode → int
The hash code for this object.
no setterinherited
interstitialAfter → int
Interstitial frequency: show after N screen visits
final
interstitialEnabled → bool
final
interstitialIds → PlatformAdIds?
final
isAppOpenAvailable → bool
no setter
isBannerAvailable → bool
no setter
isDirectInterstitialAvailable → bool
no setter
isInterstitialAvailable → bool
no setter
isNativeAvailable → bool
no setter
isRewardedAvailable → bool
no setter
maxRetryAttempts → int
Retry settings
final
nativeEnabled → bool
final
nativeIds → PlatformAdIds?
final
preloadEnabled → bool
final
retryBaseDelay → Duration
final
rewardedEnabled → bool
final
rewardedIds → PlatformAdIds?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

adIdFor(AdType type) → String?
Get the current platform ad ID for a type (null if not available)
copyWith({PlatformAdIds? bannerIds, PlatformAdIds? interstitialIds, PlatformAdIds? nativeIds, PlatformAdIds? appOpenIds, PlatformAdIds? rewardedIds, PlatformAdIds? directInterstitialIds, bool? bannerEnabled, bool? interstitialEnabled, bool? nativeEnabled, bool? appOpenEnabled, bool? rewardedEnabled, bool? adsEnabled, bool? directInterstitialEnabled, int? interstitialAfter, int? maxRetryAttempts, Duration? retryBaseDelay, bool? preloadEnabled, Duration? connectivityRecheckInterval}) → AdsConfig
hasAdType(AdType type) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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