when writing a `@Preview` composable, is there any...
# compose
b
when writing a
@Preview
composable, is there any way to get it to render a piece of UI with focus applied? I tried adding a
FocusRequester
and using a
LaunchedEffect
in the preview to request focus, but that doesn’t seem to work in the preview.
FWIW, I’m writing a wrapper on a
TextField
composable that uses a
VisualTransformation
that gets applied only when the TextField has focus. So I’d like to render a preview that shows the TextField with focus so that you can see what the Transform looks like.
l
I’d be curious to know that too. Please update us if/when you find a solution
b
👍