OnboardingViewPage
fun OnboardingViewPage(modifier: Modifier = Modifier, backgroundColor: Color, onColor: Color, title: String, description: String, iconId: Int)
A composable that represents a page in the onboarding view pager.
Samples
import android.app.Activity
import android.view.Window
import android.view.WindowInsetsController
import androidx.compose.animation.core.spring
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.SideEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.hilt.navigation.compose.hiltViewModel
import edu.stanford.spezi.core.design.theme.Colors.onPrimary
import edu.stanford.spezi.core.design.theme.Colors.onSecondary
import edu.stanford.spezi.core.design.theme.Colors.onTertiary
import edu.stanford.spezi.core.design.theme.Colors.primary
import edu.stanford.spezi.core.design.theme.Colors.secondary
import edu.stanford.spezi.core.design.theme.Colors.tertiary
import edu.stanford.spezi.core.design.theme.Spacings
import edu.stanford.spezi.core.utils.extensions.testIdentifier
import edu.stanford.spezi.module.onboarding.sequential.components.OnboardingViewPage
import edu.stanford.spezi.module.onboarding.sequential.components.PageIndicator
fun main() {
//sampleStart
val viewModel: SequentialOnboardingViewModel = hiltViewModel()
val uiState by viewModel.uiState.collectAsState()
SequentialOnboardingScreen(
onAction = viewModel::onAction,
uiState = uiState,
)
//sampleEnd
}