I have this composable function, and how can I preview this?? ```@Composable fun NutritionalBalance...
c
I have this composable function, and how can I preview this??
Copy code
@Composable
fun NutritionalBalanceRoute(
    viewModel: NutritionalBalanceViewModel = hiltViewModel()
) {
    Column(
        modifier = Modifier.fillMaxSize(),
        verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Text(
            text = "Nutrition",
            style = MaterialTheme.typography.headlineMedium
        )
    }
}
h
You can split it like this ?
Copy code
@Composable
fun NutritionalBalanceRoute(
    viewModel: NutritionalBalanceViewModel = hiltViewModel()
) {
    NutritionalBalanceScreen(
        data = vm.data 
    )
}

@Composable
fun NutritionalBalanceScreen(
   // all needed parameters
) {
Column(
        modifier = Modifier.fillMaxSize(),
        verticalArrangement = Arrangement.Center,
        horizontalAlignment = Alignment.CenterHorizontally
    ) {
        Text(
            text = "Nutrition",
            style = MaterialTheme.typography.headlineMedium
        )
    }
}

@Preview
@Composable
private fun NutritionalBalanceScreenPreview() {
   NutritionalBalanceScreen()
}
c
Well, Actually, This is for the bottom navigation bar.
I mean it's one of the menus.
I'd like to see the bottom navigation preview. Then, where and how should I set it?
I guess one menu preview seems weird.
Ah.. I sorry it's a screen like a fragment.