Now i am coding my android app which i am going to release on Google Play. I use compose for ui. TopAppBar
element requires using OptIn
annotation since it’s marked with ExperimentalMaterial3Api
which states that This material API is experimental and is likely to change or to be removed in the future
.
@ExperimentalMaterial3Api
@Composable
fun TopAppBar(
title: @Composable () -> Unit,
modifier: Modifier = Modifier,
navigationIcon: @Composable () -> Unit = {},
actions: @Composable RowScope.() -> Unit = {},
windowInsets: WindowInsets = TopAppBarDefaults.windowInsets,
colors: TopAppBarColors = TopAppBarDefaults.topAppBarColors(),
scrollBehavior: TopAppBarScrollBehavior? = null
) {
@RequiresOptIn(
"This material API is experimental and is likely to change or to be removed in" +
" the future."
)
@Retention(AnnotationRetention.BINARY)
annotation class ExperimentalMaterial3Api
So is it worth using OptIn
in a commercial app ? Or it’s better to use some alternatives to avoid potential issues ?