OtpPinField constructor

const OtpPinField({
  1. Key? key,
  2. double fieldHeight = 50.0,
  3. double fieldWidth = 50.0,
  4. int maxLength = 4,
  5. dynamic onCodeChanged(
    1. String
    )?,
  6. OtpPinFieldStyle? otpPinFieldStyle = const OtpPinFieldStyle(),
  7. TextInputAction textInputAction = TextInputAction.done,
  8. OtpPinFieldInputType otpPinFieldInputType = OtpPinFieldInputType.none,
  9. OtpPinFieldDecoration otpPinFieldDecoration = OtpPinFieldDecoration.underlinedPinBoxDecoration,
  10. String otpPinInputCustom = '*',
  11. String? smsRegex,
  12. bool beforeTextPaste(
    1. String? text
    )?,
  13. required OnDone onSubmit,
  14. required OnChange onChange,
  15. TextInputType keyboardType = TextInputType.number,
  16. bool autoFocus = true,
  17. bool? autoFillEnable = false,
  18. bool? phoneNumbersHint = false,
  19. bool highlightBorder = true,
  20. bool? showCursor = true,
  21. Color? cursorColor,
  22. double? cursorWidth = 2,
  23. MainAxisAlignment? mainAxisAlignment,
  24. Widget? upperChild,
  25. Widget? middleChild,
  26. Widget? customKeyboard,
  27. bool? showCustomKeyboard,
  28. dynamic onPhoneHintSelected(
    1. String?
    )?,
  29. bool? showDefaultKeyboard = true,
  30. bool allowPasting = true,
})

Implementation

const OtpPinField({
  super.key,
  this.fieldHeight = 50.0,
  this.fieldWidth = 50.0,
  this.maxLength = 4,
  this.onCodeChanged,
  this.otpPinFieldStyle = const OtpPinFieldStyle(),
  this.textInputAction = TextInputAction.done,
  this.otpPinFieldInputType = OtpPinFieldInputType.none,
  this.otpPinFieldDecoration =
      OtpPinFieldDecoration.underlinedPinBoxDecoration,
  this.otpPinInputCustom = '*',
  this.smsRegex,
  this.beforeTextPaste,
  required this.onSubmit,
  required this.onChange,
  this.keyboardType = TextInputType.number,
  this.autoFocus = true,
  this.autoFillEnable = false,
  this.phoneNumbersHint = false,
  this.highlightBorder = true,
  this.showCursor = true,
  this.cursorColor,
  this.cursorWidth = 2,
  this.mainAxisAlignment,
  this.upperChild,
  this.middleChild,
  this.customKeyboard,
  this.showCustomKeyboard,
  this.onPhoneHintSelected,
  this.showDefaultKeyboard = true,
  this.allowPasting = true,
});