createPageViewIfType

private inline fun <T : ViewModel<out UiState>> createPageViewIfType(vm: ViewModel<out UiState>, noinline content: @Composable ReversiScope.() -> Unit): @Composable ReversiScope.() -> Unit

Creates a composable page view if the provided ViewModel is of the expected type T.

Reference:

Return

A composable function if the ViewModel is of type T, otherwise an empty composable.

Parameters

T

The expected type of the ViewModel.

vm

The ViewModel instance to check.

content

The composable content to return if the type matches.