AdFactory class

Comprehensive Ad Factory that creates all types of ads Handles both inventory-based ads (banner/native) and direct ads (interstitial/rewarded/appopen) Uses HashMaps to keep ad instances for reuse

Constructors

AdFactory()

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 Methods

clearAllAdInstances() → void
Clear all stored ad instances (useful for memory management)
createAppOpenAd(String key, String defaultUnitId) → DreamAppOpenAd
Create App Open Ad with remote config support
createBannerInventory(String key, String defaultUnitId) → BannerInventory
Create Banner Inventory with remote config support
createInterstitialAd(String key, String defaultUnitId) → DreamInterstitialAd
Create Interstitial Ad with remote config support
createNativeInventory(String key, String defaultUnitId) → NativeInventory
Create Native Inventory with remote config support
createRewardedAd(String key, String defaultUnitId) → DreamRewardedAd
Create Rewarded Ad with remote config support
getAdInstanceCounts() → Map<String, int>
Get count of stored ad instances
getSingleLocalInterstitialAd(String localKey, String unitId) → DreamInterstitialAd
Get single local interstitial ad
removeAdInstance(String key, String adType) → void
Remove specific ad instance by key