OTPField constructor
const
OTPField({
- Key? key,
- required TextStyle style,
- required String value,
- required int maxLength,
- double gap = 10,
- double individualBoxMaxWidth = double.infinity,
- double? height,
- double? width = double.infinity,
- EdgeInsets caretPadding = const EdgeInsets.symmetric(horizontal: 10),
- required BoxDecoration individualBoxDecoration,
- required BoxDecoration caretDecoration,
- double caretWidth = 2,
- required ValueChanged<
String> onChanged, - bool obscureText = false,
- bool autofocus = false,
- List<
TextInputFormatter> ? inputFormatters, - required VoidCallback onSubmit,
Implementation
const OTPField({
Key? key,
required this.style,
required this.value,
required this.maxLength,
this.gap = 10,
this.individualBoxMaxWidth = double.infinity,
this.height,
this.width = double.infinity,
this.caretPadding = const EdgeInsets.symmetric(horizontal: 10),
required this.individualBoxDecoration,
required this.caretDecoration,
this.caretWidth = 2,
required this.onChanged,
this.obscureText = false,
this.autofocus = false,
this.inputFormatters,
required this.onSubmit,
}) : super(key: key);