NativeInventory class

Native inventory implementation

Inheritance

Constructors

NativeInventory({required String key, required AdInventoryConfig config})

Properties

adSlots ↔ List<DreamNativeAd>
List of ad slots
latefinaloverride-getter
config → AdInventoryConfig
Configuration for this inventory
final
hashCode → int
The hash code for this object.
no setterinherited
isEnable → bool
Check if inventory is enabled
no setterinherited
key → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
Destroy all ads in inventory
inherited
destroyAd(DreamNativeAd adSlot) → void
Destroy an ad slot
override
isReady() → bool
Check if inventory is ready
inherited
isSuccessResult(DreamAdResult result) → bool
Check if result is successful
override
load(BuildContext context) → Future<DreamAdResult>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setListener(DreamNativeAdListener listener) → void
Set listener for native ads
show(BuildContext context, Widget container, {int? stacks, bool clearContainer = true}) → Future<DreamAdResult>
Show ads from inventory with retry logic and return the first result (success preferred, fallback to the last failure).
override
showAd(BuildContext context, Widget container, DreamNativeAd adSlot, [void removeContainerChildren()?]) → Future<DreamAdResult>
Show an ad from the inventory
override
toString() → String
A string representation of this object.
inherited

Operators

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