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)
}
)
}
}
Content copied to clipboard
Types
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
interface SequentialOnboardingRepository
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
Link copied to clipboard
Functions
Link copied to clipboard
The screen that displays the sequential onboarding steps.