TestModeContext

Dependencies available to TestModeState.Actions.

Implemented directly by TestMode — actions receive the manager itself as their context, mirroring the com.superwall.sdk.identity.IdentityManager / com.superwall.sdk.identity.IdentityContext pattern.

Inheritors

Properties

Link copied to clipboard
abstract val activityProvider: () -> ActivityProvider?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val apiKey: () -> String
Link copied to clipboard
abstract val dashboardBaseUrl: () -> String
Link copied to clipboard
abstract val entitlements: Entitlements?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val scope: CoroutineScope
Link copied to clipboard
abstract val showModal: suspend (activity: Activity, reason: String, hasPurchaseController: Boolean, availableEntitlements: List<String>, apiKey: String, dashboardBaseUrl: String, savedSettings: TestModeSettings?) -> TestModeModalResult
Link copied to clipboard
open override val state: StateFlow<TestModeState>

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

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

Link copied to clipboard
open suspend fun immediate(action: TypedAction<TestModeContext>)
Link copied to clipboard
open suspend fun immediateUntil(action: TypedAction<TestModeContext>, until: (TestModeState) -> 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<TestModeState>)

Apply a state reducer inline.