UiOtpField constructor
const
UiOtpField({
- Key? key,
- int pinLength = 6,
- double fieldSize = 56.0,
- double fieldGap = 8.0,
- TextStyle? textStyle,
- Color? cursorColor,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onCompleted, - VoidCallback? onResend,
- Duration resendDuration = const Duration(seconds: 60),
- bool autoSubmit = true,
- OtpDecoration? decoration,
- ResendButtonBuilder? resendButtonBuilder,
- bool showResendButton = true,
- OtpValidationState validationState = OtpValidationState.none,
- bool enabled = true,
- TextInputType keyboardType = TextInputType.number,
- bool autofocus = false,
Implementation
const UiOtpField({
super.key,
this.pinLength = 6,
this.fieldSize = 56.0,
this.fieldGap = 8.0,
this.textStyle,
this.cursorColor,
this.onChanged,
this.onCompleted,
this.onResend,
this.resendDuration = const Duration(seconds: 60),
this.autoSubmit = true,
this.decoration,
this.resendButtonBuilder,
this.showResendButton = true,
this.validationState = OtpValidationState.none,
this.enabled = true,
this.keyboardType = TextInputType.number,
this.autofocus = false,
});