Apparently, starting from Compose 1.2, it's possible to create a single annotation for previewing multiple configurations of a particular composable instead of duplicating @Preview multiple times everywhere.
However, as of Jetpack Compose version 1.2 and Android Studio Chipmunk, preview just don't work. Therefore, as soon as previews get fixed, create a single preview annotation and use it for previewing composables. Something like this:
@Preview
@Preview(uiMode = Configuration.UI_MODE_NIGHT_YES)
annotation class GamedgePreview
Then, use it like so:
@GamedgePreview
@Composable
private fun GameInfoLoadingStatePreview() {
// ...
}
Apparently, starting from Compose 1.2, it's possible to create a single annotation for previewing multiple configurations of a particular composable instead of duplicating
@Preview
multiple times everywhere.However, as of Jetpack Compose version 1.2 and Android Studio Chipmunk, preview just don't work. Therefore, as soon as previews get fixed, create a single preview annotation and use it for previewing composables. Something like this:
Then, use it like so: