Package org.orbitmvi.orbit

Types

Link copied to clipboard
interface Container<STATE : Any, SIDE_EFFECT : Any>

The heart of the Orbit MVI system. Represents an MVI container with its input and outputs. You can manipulate the container through the orbit function

Link copied to clipboard
interface ContainerDecorator<STATE : Any, SIDE_EFFECT : Any> : Container<STATE, SIDE_EFFECT>

A decorator applying additional logic to a Container.

Link copied to clipboard
interface ContainerHost<STATE : Any, SIDE_EFFECT : Any>

Apply this interface to anything you want to become an orbit container host. Typically this will be an Android ViewModel but it can be applied to simple presenters etc.

Functions

Link copied to clipboard
fun <STATE : Any, SIDE_EFFECT : Any> CoroutineScope.container(initialState: STATE, settings: Container.Settings = Settings(), onCreate: (STATE) -> Unit? = null): Container<STATE, SIDE_EFFECT>

Helps create a concrete container in a standard way.

Link copied to clipboard
fun <ERROR CLASS><out <ERROR CLASS>>.subscribe(onEach: (item: Any) -> Unit, onComplete: () -> Unit, onThrow: (error: Throwable) -> Unit): <ERROR CLASS>
fun <ERROR CLASS><out <ERROR CLASS>>.subscribe(dispatcher: <ERROR CLASS>, onEach: (item: Any) -> Unit, onComplete: () -> Unit, onThrow: (error: Throwable) -> Unit): <ERROR CLASS>