JetPinField constructor

const JetPinField({
  1. Key? key,
  2. required String name,
  3. String? initialValue,
  4. FormFieldValidator<String>? validator,
  5. bool isRequired = true,
  6. int length = 6,
  7. ValueChanged<String>? onCompleted,
  8. ValueChanged<String>? onSubmitted,
  9. ValueChanged<String>? onChanged,
  10. bool autofocus = false,
  11. bool enabled = true,
  12. bool obscureText = false,
  13. bool showCursor = true,
  14. String? hintCharacter,
  15. bool readOnly = false,
  16. double spacing = 16.0,
  17. double? boxWidth,
  18. double? boxHeight,
  19. BorderRadius? borderRadius,
  20. Color? defaultBorderColor,
  21. Color? focusedBorderColor,
  22. Color? filledBorderColor,
  23. Color? submittedBorderColor,
  24. Color? errorBorderColor,
  25. Color? defaultFillColor,
  26. Color? focusedFillColor,
  27. Color? filledFillColor,
  28. Color? submittedFillColor,
  29. Color? errorFillColor,
  30. double borderWidth = 2.0,
  31. TextStyle? textStyle,
  32. TextStyle? hintStyle,
  33. TextStyle? errorStyle,
  34. Curve animationCurve = Curves.easeInOut,
  35. Duration animationDuration = const Duration(milliseconds: 200),
  36. bool hapticFeedback = false,
  37. bool closeKeyboardWhenCompleted = false,
  38. String? errorText,
  39. String? helperText,
  40. TextStyle? helperStyle,
})

Implementation

const JetPinField({
  super.key,
  required this.name,
  this.initialValue,
  this.validator,
  this.isRequired = true,
  this.length = 6,
  this.onCompleted,
  this.onSubmitted,
  this.onChanged,
  this.autofocus = false,
  this.enabled = true,
  this.obscureText = false,
  this.showCursor = true,
  this.hintCharacter,
  this.readOnly = false,
  this.spacing = 16.0,
  this.boxWidth,
  this.boxHeight,
  this.borderRadius,
  this.defaultBorderColor,
  this.focusedBorderColor,
  this.filledBorderColor,
  this.submittedBorderColor,
  this.errorBorderColor,
  this.defaultFillColor,
  this.focusedFillColor,
  this.filledFillColor,
  this.submittedFillColor,
  this.errorFillColor,
  this.borderWidth = 2.0,
  this.textStyle,
  this.hintStyle,
  this.errorStyle,
  this.animationCurve = Curves.easeInOut,
  this.animationDuration = const Duration(milliseconds: 200),
  this.hapticFeedback = false,
  this.closeKeyboardWhenCompleted = false,
  this.errorText,
  this.helperText,
  this.helperStyle,
});