lastEffect

@JvmName(name = "lastEffectWithType")
inline fun <T : Transmission.Effect> lastEffect(): T?

Returns the last effect transmission of the specified type.

This is useful for asserting on side effects that should occur after processing.

Return

The last effect of type T, or null if none exists

Example:

val loginEffect = lastEffect<AuthEffect.LoginSuccessful>()
assertNotNull(loginEffect)
assertEquals("welcome_screen", loginEffect.targetScreen)

Parameters

T

The type of effect to retrieve


Returns the last effect transmission of any type.

Return

The last effect transmission, or null if none exists