OTPTextField constructor

OTPTextField({
  1. Key? key,
  2. int length = 4,
  3. double width = 10,
  4. OtpFieldController? controller,
  5. double fieldWidth = 30,
  6. EdgeInsetsGeometry margin = const EdgeInsets.symmetric(horizontal: 3),
  7. OtpFieldStyle? otpFieldStyle,
  8. TextInputType keyboardType = TextInputType.number,
  9. TextStyle style = const TextStyle(),
  10. double outlineBorderRadius = 10,
  11. MainAxisAlignment textFieldAlignment = MainAxisAlignment.spaceBetween,
  12. bool obscureText = false,
  13. FieldStyle fieldStyle = FieldStyle.underline,
  14. ValueChanged<String>? onChanged,
  15. 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);