Package-level declarations
Types
Link copied to clipboard
data class Step( val actionControls: @Composable () -> Unit? = null, val initiallyExpanded: Boolean = false, val enabled: MutableState<Boolean>? = null, val stepIcon: ImageVector, val title: StringResource, val content: @Composable ColumnScope.() -> Unit, val isError: MutableState<Boolean>? = null, val dismissAction: (MutableState<Boolean>) -> Unit? = null, val dismissIcon: ImageVector = Icons.Default.Cancel, val confirmAction: (MutableState<Boolean>) -> Unit = { it.value = false }, val confirmIcon: ImageVector = Icons.Default.CheckCircle)
The information related to a single step to represent in the Stepper component
Link copied to clipboard
The StepContent
annotation is used to mark the methods which are the content of a step of the Stepper component. It indicates the number of step and whether the step is enabled in specific scenarios.
Functions
Link copied to clipboard
private fun ActionControls( expandsStepIcon: ImageVector, expanded: MutableState<Boolean>, dismissAction: (MutableState<Boolean>) -> Unit?, dismissIcon: ImageVector, dismissButtonColor: Color, confirmAction: (MutableState<Boolean>) -> Unit, confirmIcon: ImageVector, confirmColor: Color)
The action controls section to manage the StepAction
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private fun StepAction( shape: Shape, errorColor: Color, confirmColor: Color, stepBackgroundColor: Color, expandsStepIcon: ImageVector, step: Step, bottomDivider: Boolean = true)
Section dedicated to a single Step
Link copied to clipboard
fun Stepper( containerModifier: Modifier = Modifier, stepperModifier: Modifier = Modifier, headerSection: @Composable () -> Unit? = null, startStepShape: Shape = RoundedCornerShape(
topStart = 12.dp,
topEnd = 12.dp
), middleStepShape: Shape = RectangleShape, finalStepShape: Shape = RoundedCornerShape(
bottomStart = 12.dp,
bottomEnd = 12.dp
), stepBackgroundColor: Color = MaterialTheme.colorScheme.surfaceContainerHighest, errorColor: Color = MaterialTheme.colorScheme.error, confirmColor: Color = MaterialTheme.colorScheme.primary, expandsStepIcon: ImageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight, vararg steps: Step)
This component allows to create a dynamic interaction with the user dividing for example a long procedure such item creation, customization, etc... in different specific steps where the user can interact.