rememberNativeAdState

fun rememberNativeAdState(adUnitId: String, enabled: Boolean = true, slotName: String = adUnitId, cache: NativeAdCache? = null, cacheKey: Any? = null): NativeAdSlotState(source)

rememberNativeAd with the reason an empty slot is empty.

Failures are handed to AdLoadReporter on the way through, so every toolkit ad surface reports the same way without each one remembering to.

Parameters

slotName

how this placement is named in logs and Crashlytics. Defaults to the ad unit, which is better than nothing but worth passing when the caller has a real name.

cache

keeps the ad while the slot is out of composition. Ignored without cacheKey.

cacheKey

identifies this slot in cache; unique among the slots composed at one time.