Package-level declarations

Types

Link copied to clipboard

Interface implemented by a rendering class to allow it to drive a composable UI via an appropriate ScreenComposableFactory implementation, by simply overriding the Content method.

Link copied to clipboard
typealias CompositionRoot = @Composable (content: @Composable () -> Unit) -> Unit

A composable function that will be used to wrap the first (highest-level) ScreenComposableFactory view factory in a composition. This can be used to setup any composition locals that all ScreenComposableFactory factories need access to, such as UI themes.

Link copied to clipboard

A ViewRegistry.Entry that uses a Composable function to display ScreenT. This is the fundamental unit of Compose tooling in Workflow UI, the Compose analogue of ScreenViewFactory.

Functions

Link copied to clipboard

Exposes the textValue of a TextController as a remembered MutableState, suitable for use from @Composable functions.

Link copied to clipboard

Convenience function for creating anonymous ComposeScreens since composable fun interfaces aren't supported. See the ComposeScreen class for more information.

Link copied to clipboard
fun <PropsT, OutputT : Any, RenderingT> Workflow<PropsT, OutputT, RenderingT>.renderAsState(props: PropsT, interceptors: List<WorkflowInterceptor> = emptyList(), scope: CoroutineScope = rememberCoroutineScope(), runtimeConfig: RuntimeConfig = RuntimeConfigOptions.DEFAULT_CONFIG, onOutput: suspend (OutputT) -> Unit): State<RenderingT>

Runs this Workflow as long as this composable is part of the composition, and returns a State object that will be updated whenever the runtime emits a new RenderingT. Note that here, and in the rest of the documentation for this class, the "State" type refers to Compose's snapshot State type, not the concept of the StateT type in a particular workflow.

Link copied to clipboard
Link copied to clipboard

It is rare to call this method directly. Instead the most common path is to pass Screen instances to WorkflowRendering, which will apply the ScreenComposableFactory and ScreenComposableFactoryFinder machinery for you.

Link copied to clipboard

Replaces the ScreenComposableFactoryFinder and ScreenViewFactoryFinder found in the receiving ViewEnvironment with wrappers that are able to delegate from one platform to the other. Required to allow WorkflowViewStub to handle renderings bound to @Composable functions, and to allow WorkflowRendering to handle renderings bound to ScreenViewFactory.

Link copied to clipboard
fun WorkflowRendering(rendering: Screen, viewEnvironment: ViewEnvironment, modifier: Modifier = Modifier)

Renders rendering into the composition using this ViewEnvironment's ScreenViewFactoryFinder to generate the view.