UiOtpField constructor

const UiOtpField({
  1. Key? key,
  2. int pinLength = 6,
  3. double fieldSize = 56.0,
  4. double fieldGap = 8.0,
  5. TextStyle? textStyle,
  6. Color? cursorColor,
  7. ValueChanged<String>? onChanged,
  8. ValueChanged<String>? onCompleted,
  9. VoidCallback? onResend,
  10. Duration resendDuration = const Duration(seconds: 60),
  11. bool autoSubmit = true,
  12. OtpDecoration? decoration,
  13. ResendButtonBuilder? resendButtonBuilder,
  14. bool showResendButton = true,
  15. OtpValidationState validationState = OtpValidationState.none,
  16. bool enabled = true,
  17. TextInputType keyboardType = TextInputType.number,
  18. 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,
});