//workflow/com.squareup.workflow1.ui.compose.tooling/Preview
Preview¶
[androidJvm]
Content
@WorkflowUiExperimentalApi()
@Composable()
fun <RenderingT : Any> ViewFactory<RenderingT>.Preview(rendering: RenderingT, modifier: Modifier = Modifier, placeholderModifier: Modifier = Modifier, viewEnvironmentUpdater: (ViewEnvironment) -> ViewEnvironment? = null)
More info
Draws this ViewFactory using a special preview ViewRegistry.
Use inside @Preview Composable functions.
Note: rendering must be the same type as this ViewFactory, even though the type system does not enforce this constraint. This is due to a Compose compiler bug tracked here.
Parameters¶
androidJvm
modifier | Modifier that will be applied to this ViewFactory. |
placeholderModifier | Modifier that will be applied to any nested renderings this factory shows. |
viewEnvironmentUpdater | Function that configures the ViewEnvironment passed to this factory. |