Package-level declarations

The sequential package ensures that the onboarding steps are followed in a specific sequence, providing a smooth and logical flow for the user. The Screen can be used anywhere after providing the SequentialOnboardingData via an implementation of the SequentialOnboardingRepository interface.

Example implementation:

class EngageSequentialOnboardingRepository @Inject internal constructor(
private val navigator: Navigator,
) : SequentialOnboardingRepository {
override suspend fun getSequentialOnboardingData(): SequentialOnboardingData {
return SequentialOnboardingData(
steps = listOf(
Step(
title = "Pair with Devices",
description = "Pair with the provided weight scale and blood pressure cuff in Bluetooth settings.",
icon = edu.stanford.spezi.core.design.R.drawable.ic_bluetooth
),
Step(
title = "Record Health Data",
description = "Use the weight scale and blood pressure cuff to record health data in Heart Health.",
icon = edu.stanford.spezi.core.design.R.drawable.ic_assignment
),
Step(
title = "Tune Medications",
description = "See your medication dosage, schedule, and updates in Medications.",
icon = edu.stanford.spezi.core.design.R.drawable.ic_medication
),
Step(
title = "Summarize",
description = "Generate and export a full PDF health report in Health Summary.",
icon = edu.stanford.spezi.core.design.R.drawable.ic_assignment
),
Step(
title = "Learn",
description = "Learn more about your medications and heart health in Education.",
icon = edu.stanford.spezi.core.design.R.drawable.ic_school
)
),
actionText = "Start",
onAction = {
navigator.navigateTo(AccountNavigationEvent.LoginScreen)
}
)
}
}

Types

Link copied to clipboard
sealed interface Action

A sealed interface that represents the actions that can be triggered in the sequential onboarding screen.

Link copied to clipboard

Button event that can be triggered by the user in sequential onboarding screen.

Link copied to clipboard
data class SequentialOnboardingData(val steps: List<Step>, val actionText: String, val onAction: () -> Unit)
Link copied to clipboard

A interface that needs to be implemented and provided by the app to provide a list of steps to be shown in the edu.stanford.spezi.module.onboarding.sequential.SequentialOnboardingScreen. The implementation should be provided by the app using Dagger.

Link copied to clipboard
data class SequentialOnboardingUiState(val steps: List<Step> = emptyList(), val currentPage: Int = 0, val pageCount: Int = steps.size, val actionText: String = "Start")

A data class that represents the current ui state of the sequential onboarding screen.

Link copied to clipboard
data class Step(val title: String, val description: String, val icon: Int = edu.stanford.spezi.core.design.R.drawable.ic_groups)

Represents a step in the onboarding process.

Functions

Link copied to clipboard

The screen that displays the sequential onboarding steps.