OtpPinField constructor
const
OtpPinField({
- Key? key,
- double fieldHeight = 50.0,
- double fieldWidth = 50.0,
- int maxLength = 4,
- dynamic onCodeChanged()?,
- OtpPinFieldStyle? otpPinFieldStyle = const OtpPinFieldStyle(),
- TextInputAction textInputAction = TextInputAction.done,
- OtpPinFieldInputType otpPinFieldInputType = OtpPinFieldInputType.none,
- OtpPinFieldDecoration otpPinFieldDecoration = OtpPinFieldDecoration.underlinedPinBoxDecoration,
- String otpPinInputCustom = '*',
- String? smsRegex,
- required OnDone onSubmit,
- required OnChange onChange,
- TextInputType keyboardType = TextInputType.number,
- bool autoFocus = true,
- bool? autoFillEnable = false,
- bool? phoneNumbersHint = false,
- bool highlightBorder = true,
- bool? showCursor = true,
- Color? cursorColor,
- double? cursorWidth = 2,
- MainAxisAlignment? mainAxisAlignment,
- Widget? upperChild,
- Widget? middleChild,
- Widget? customKeyboard,
- bool? showCustomKeyboard,
- bool? showDefaultKeyboard = true,
Implementation
const OtpPinField(
{Key? 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,
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.showDefaultKeyboard = true})
: super(key: key);