UOtpField constructor
const
UOtpField({
- required Color cursorColor,
- required Color fillColor,
- required Color activeColor,
- required Color borderColor,
- required TextEditingController controller,
- Key? key,
- int length = 6,
- bool autoFocus = false,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onCompleted, - FormFieldValidator<
String> ? validator, - TextStyle? textStyle,
- double fieldWidth = 48,
- double fieldHeight = 60,
- double borderRadius = 8,
- double borderWidth = 1.5,
- bool obscureText = false,
- String obscuringCharacter = "•",
- TextInputType keyboardType = TextInputType.number,
- bool showCursor = true,
- bool readOnly = false,
- InputDecoration? decoration,
- bool autoDismissKeyboard = true,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
Implementation
const UOtpField({
required this.cursorColor,
required this.fillColor,
required this.activeColor,
required this.borderColor,
required this.controller,
super.key,
this.length = 6,
this.autoFocus = false,
this.onChanged,
this.onCompleted,
this.validator,
this.textStyle,
this.fieldWidth = 48,
this.fieldHeight = 60,
this.borderRadius = 8,
this.borderWidth = 1.5,
this.obscureText = false,
this.obscuringCharacter = "•",
this.keyboardType = TextInputType.number,
this.showCursor = true,
this.readOnly = false,
this.decoration,
this.autoDismissKeyboard = true,
this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
});