otp screen in flutter code example
Example: flutter otp input scrren
OtpTextField(
numberOfFields: 5,
borderColor: Color(0xFF512DA8),
showFieldAsBox: true, //set to true to show as box or false to show as dash
onCodeChanged: (String code) {
//handle validation or checks here
},
onSubmit: (String verificationCode){
showDialog(
context: context,
builder: (context){
return AlertDialog(
title: Text("Verification Code"),
content: Text('Code entered is $verificationCode'),
);
}
);
}, // end onSubmit
),