Package-level declarations

Types

Link copied to clipboard
data class InfoText(val text: String, val textStyle: TextStyle = TextStyle.Default, val fontSize: TextUnit = 14.sp, val color: Color? = null)

Informative text about what the SplitText needs

Link copied to clipboard

The SplitTextState class is useful to manage a SplitText component giving the details currently used in that component

Properties

Link copied to clipboard
private lateinit var focusManager: FocusManager

focusManager the focus manager

Functions

Link copied to clipboard
private fun pasteSlices(splits: Int, currentTextSlices: ArrayList<MutableState<String>>, slice: String)

Method used to automatically all the SplitBox when the user copy the text to insert in the SplitText

Link copied to clipboard

The remember function used to create a SplitTextState for a SplitText component

Link copied to clipboard
private fun SplitBox(    currentTextSlices: ArrayList<MutableState<String>>,     boxSelectedColor: Color = MaterialTheme.colorScheme.inversePrimary,     boxShape: Shape,     boxTextStyle: TextStyle,     textSlice: MutableState<String>,     currentBox: Int)

Single component to allow the user to a slice of the complete text of the SplitText component

Link copied to clipboard
fun SplitText(    columnModifier: Modifier = Modifier,     rowModifier: Modifier = Modifier,     splitsTextState: SplitTextState,     spacingBetweenBoxes: Dp = 10.dp,     boxShape: Shape = CardDefaults.shape,     boxTextStyle: TextStyle = TextStyle( fontSize = 30.sp, fontWeight = FontWeight.Bold, textAlign = TextAlign.Center ),     infoText: InfoText? = null)

Component to allow the user to insert a split text such OTP codes, PIN or any other texts of this type