OTPController

Constructors

Link copied to clipboard
constructor(otpLength: Int = 6)

Properties

Link copied to clipboard
val fieldValue: StateFlow<String>
Link copied to clipboard
val otpLength: Int = 6

Functions

Link copied to clipboard
Link copied to clipboard
fun onValueChanged(index: Int, text: String): Int

Filter invalid values and set the value of the fields to the entered text, one character per field starting from index. If the length of the filtered input is the same as the OTP we're collecting, set the full input value regardless of the starting index passed as parameter.

Link copied to clipboard
fun reset()