HcOTPTextField constructor
const
HcOTPTextField({
- Key? key,
- int length = 4,
- double width = 10,
- OtpFieldController? controller,
- double fieldWidth = 30,
- double spaceBetween = 0,
- OtpFieldStyle? otpFieldStyle,
- bool hasError = false,
- TextInputType keyboardType = TextInputType.number,
- TextStyle style = const TextStyle(),
- double outlineBorderRadius = 10,
- TextCapitalization textCapitalization = TextCapitalization.none,
- MainAxisAlignment textFieldAlignment = MainAxisAlignment.spaceBetween,
- bool obscureText = false,
- FieldStyle fieldStyle = FieldStyle.underline,
- ValueChanged<
String> ? onChanged, - List<
TextInputFormatter> ? inputFormatter, - EdgeInsets contentPadding = const EdgeInsets.symmetric(horizontal: 4, vertical: 8),
- bool isDense = false,
- 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);