fillOtp

fun TextFieldState.fillOtp(otp: String, length: Int)(source)

Replaces the content with the first length digits of otp, for example a code read from SMS.

SmsUserConsentEffect(
codeLength = 6,
onCodeReceive = { code -> otpState.fillOtp(code, 6) },
onError = {},
)