PinPut constructor

const PinPut({
  1. Key? key,
  2. required int fieldsCount,
  3. ValueChanged<String>? onSubmit,
  4. FormFieldSetter<String>? onSaved,
  5. ValueChanged<String>? onChanged,
  6. VoidCallback? onTap,
  7. ValueChanged<String?>? onClipboardFound,
  8. TextEditingController? controller,
  9. FocusNode? focusNode,
  10. Widget? preFilledWidget,
  11. List<int> separatorPositions = const [],
  12. Widget separator = const SizedBox(width: 15.0),
  13. TextStyle? textStyle,
  14. BoxDecoration? submittedFieldDecoration,
  15. BoxDecoration? selectedFieldDecoration,
  16. BoxDecoration? followingFieldDecoration,
  17. BoxDecoration? disabledDecoration,
  18. double? eachFieldWidth,
  19. double? eachFieldHeight,
  20. MainAxisAlignment fieldsAlignment = MainAxisAlignment.spaceBetween,
  21. AlignmentGeometry eachFieldAlignment = Alignment.center,
  22. EdgeInsetsGeometry? eachFieldMargin,
  23. EdgeInsetsGeometry? eachFieldPadding,
  24. BoxConstraints eachFieldConstraints = const BoxConstraints(minHeight: 40.0, minWidth: 40.0),
  25. InputDecoration? inputDecoration,
  26. Curve animationCurve = Curves.linear,
  27. Duration animationDuration = const Duration(milliseconds: 160),
  28. PinAnimationType pinAnimationType = PinAnimationType.slide,
  29. Offset? slideTransitionBeginOffset,
  30. bool enabled = true,
  31. bool checkClipboard = false,
  32. bool useNativeKeyboard = true,
  33. bool autofocus = false,
  34. AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
  35. bool withCursor = false,
  36. Widget? cursor,
  37. Brightness? keyboardAppearance,
  38. List<TextInputFormatter>? inputFormatters,
  39. FormFieldValidator<String>? validator,
  40. TextInputType keyboardType = TextInputType.number,
  41. String? obscureText,
  42. TextCapitalization textCapitalization = TextCapitalization.none,
  43. TextInputAction? textInputAction,
  44. ToolbarOptions? toolbarOptions = const ToolbarOptions(paste: true),
  45. MainAxisSize mainAxisSize = MainAxisSize.max,
  46. Iterable<String>? autofillHints,
  47. bool enableIMEPersonalizedLearning = true,
  48. String? initialValue,
  49. SmartDashesType? smartDashesType,
  50. SmartQuotesType? smartQuotesType,
  51. bool enableSuggestions = true,
  52. MaxLengthEnforcement? maxLengthEnforcement,
  53. VoidCallback? onEditingComplete,
  54. double cursorWidth = 2,
  55. double? cursorHeight,
  56. Radius? cursorRadius,
  57. Color? cursorColor,
  58. bool enableInteractiveSelection = true,
  59. TextSelectionControls? selectionControls,
  60. InputCounterWidgetBuilder? buildCounter,
  61. String? restorationId,
})

Implementation

const PinPut({
  Key? key,
  required this.fieldsCount,
  this.onSubmit,
  this.onSaved,
  this.onChanged,
  this.onTap,
  this.onClipboardFound,
  this.controller,
  this.focusNode,
  this.preFilledWidget,
  this.separatorPositions = const [],
  this.separator = const SizedBox(width: 15.0),
  this.textStyle,
  this.submittedFieldDecoration,
  this.selectedFieldDecoration,
  this.followingFieldDecoration,
  this.disabledDecoration,
  this.eachFieldWidth,
  this.eachFieldHeight,
  this.fieldsAlignment = MainAxisAlignment.spaceBetween,
  this.eachFieldAlignment = Alignment.center,
  this.eachFieldMargin,
  this.eachFieldPadding,
  this.eachFieldConstraints =
      const BoxConstraints(minHeight: 40.0, minWidth: 40.0),
  this.inputDecoration,
  this.animationCurve = Curves.linear,
  this.animationDuration = const Duration(milliseconds: 160),
  this.pinAnimationType = PinAnimationType.slide,
  this.slideTransitionBeginOffset,
  this.enabled = true,
  this.checkClipboard = false,
  this.useNativeKeyboard = true,
  this.autofocus = false,
  this.autovalidateMode = AutovalidateMode.disabled,
  this.withCursor = false,
  this.cursor,
  this.keyboardAppearance,
  this.inputFormatters,
  this.validator,
  this.keyboardType = TextInputType.number,
  this.obscureText,
  this.textCapitalization = TextCapitalization.none,
  this.textInputAction,
  this.toolbarOptions = const ToolbarOptions(paste: true),
  this.mainAxisSize = MainAxisSize.max,
  this.autofillHints,
  this.enableIMEPersonalizedLearning = true,
  this.initialValue,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLengthEnforcement,
  this.onEditingComplete,
  this.cursorWidth = 2,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor,
  this.enableInteractiveSelection = true,
  this.selectionControls,
  this.buildCounter,
  this.restorationId,
})  : assert(fieldsCount > 0),
      super(key: key);