BaseContext

SDK-level actor context — extends StoreContext with storage helpers.

All Superwall domain contexts (IdentityContext, ConfigContext) extend this.

Inheritors

Properties

Link copied to clipboard
abstract val actor: StateActor<Self, S>
Link copied to clipboard
abstract val scope: CoroutineScope
Link copied to clipboard
open override val state: StateFlow<S>

Delegate state reads to the actor.

Link copied to clipboard
abstract val storage: Storage
Link copied to clipboard
abstract val tracker: suspend (TrackableSuperwallEvent) -> Unit

Functions

Link copied to clipboard
open fun delete(storable: Storable<*>)

Delete a value from storage.

Link copied to clipboard
open fun effect(action: TypedAction<Self>)

Fire-and-forget dispatch of a sub-action on this context's actor.

Link copied to clipboard
open suspend fun immediate(action: TypedAction<Self>)
Link copied to clipboard
open suspend fun immediateUntil(action: TypedAction<Self>, until: (S) -> Boolean)
Link copied to clipboard
open fun <T : Any> persist(storable: Storable<T>, value: T)

Persist a value to storage.

Link copied to clipboard
open fun <T : Any> read(storable: Storable<T>): Result<T>
Link copied to clipboard
open fun sideEffect(what: suspend () -> Unit)
Link copied to clipboard
open fun track(event: TrackableSuperwallEvent)
Link copied to clipboard
open override fun update(reducer: Reducer<S>)

Apply a state reducer inline.