OTPTextField constructor
OTPTextField({
- Key? key,
- int length = 4,
- double width = 10,
- OtpFieldController? controller,
- double fieldWidth = 30,
- EdgeInsetsGeometry margin = const EdgeInsets.symmetric(horizontal: 3),
- OtpFieldStyle? otpFieldStyle,
- TextInputType keyboardType = TextInputType.number,
- TextStyle style = const TextStyle(),
- double outlineBorderRadius = 10,
- MainAxisAlignment textFieldAlignment = MainAxisAlignment.spaceBetween,
- bool obscureText = false,
- FieldStyle fieldStyle = FieldStyle.underline,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onCompleted,
Implementation
OTPTextField(
{Key? key,
this.length = 4,
this.width = 10,
this.controller,
this.fieldWidth = 30,
this.margin: const EdgeInsets.symmetric(horizontal: 3),
this.otpFieldStyle,
this.keyboardType = TextInputType.number,
this.style = const TextStyle(),
this.outlineBorderRadius: 10,
this.textFieldAlignment = MainAxisAlignment.spaceBetween,
this.obscureText = false,
this.fieldStyle = FieldStyle.underline,
this.onChanged,
this.onCompleted})
: assert(length > 1);