It's convenient to see @Previews in Android Studio. As it stands, I have to write a lot of complicated boilerplate for this:
#if SKIP
@Preview(showBackground = true)
@Composable
fun WelcomeViewPreview() {
ProcessInfo.launch(LocalContext.current)
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
WelcomeView(welcomeName = Binding.constant("Skipper"))
.Compose(context = ComposeContext())
}
}
#else
#Preview {
WelcomeView(welcomeName: Binding.constant("Skipper"))
}
#endif
It's convenient to see
@Previews in Android Studio. As it stands, I have to write a lot of complicated boilerplate for this: