OTPField constructor

const OTPField({
  1. Key? key,
  2. required TextStyle style,
  3. required String value,
  4. required int maxLength,
  5. double gap = 10,
  6. double individualBoxMaxWidth = double.infinity,
  7. double? height,
  8. double? width = double.infinity,
  9. EdgeInsets caretPadding = const EdgeInsets.symmetric(horizontal: 10),
  10. required BoxDecoration individualBoxDecoration,
  11. required BoxDecoration caretDecoration,
  12. double caretWidth = 2,
  13. required ValueChanged<String> onChanged,
  14. bool obscureText = false,
  15. bool autofocus = false,
  16. List<TextInputFormatter>? inputFormatters,
  17. 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);