HcOTPTextField constructor

const HcOTPTextField({
  1. Key? key,
  2. int length = 4,
  3. double width = 10,
  4. OtpFieldController? controller,
  5. double fieldWidth = 30,
  6. double spaceBetween = 0,
  7. OtpFieldStyle? otpFieldStyle,
  8. bool hasError = false,
  9. TextInputType keyboardType = TextInputType.number,
  10. TextStyle style = const TextStyle(),
  11. double outlineBorderRadius = 10,
  12. TextCapitalization textCapitalization = TextCapitalization.none,
  13. MainAxisAlignment textFieldAlignment = MainAxisAlignment.spaceBetween,
  14. bool obscureText = false,
  15. FieldStyle fieldStyle = FieldStyle.underline,
  16. ValueChanged<String>? onChanged,
  17. List<TextInputFormatter>? inputFormatter,
  18. EdgeInsets contentPadding = const EdgeInsets.symmetric(horizontal: 4, vertical: 8),
  19. bool isDense = false,
  20. ValueChanged<String>? onCompleted,
})

Implementation

const HcOTPTextField({
  Key? key,
  this.length = 4,
  this.width = 10,
  this.controller,
  this.fieldWidth = 30,
  this.spaceBetween = 0,
  this.otpFieldStyle,
  this.hasError = false,
  this.keyboardType = TextInputType.number,
  this.style = const TextStyle(),
  this.outlineBorderRadius = 10,
  this.textCapitalization = TextCapitalization.none,
  this.textFieldAlignment = MainAxisAlignment.spaceBetween,
  this.obscureText = false,
  this.fieldStyle = FieldStyle.underline,
  this.onChanged,
  this.inputFormatter,
  this.contentPadding =
      const EdgeInsets.symmetric(horizontal: 4, vertical: 8),
  this.isDense = false,
  this.onCompleted,
})  : assert(length > 1),
      super(key: key);