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 = const InputDecoration(contentPadding: EdgeInsets.zero, border: InputBorder.none, counterText: ''),
  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,
  45. MainAxisSize mainAxisSize = MainAxisSize.max,
  46. Iterable<String>? autofillHints,
})

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 = const InputDecoration(
      contentPadding: EdgeInsets.zero,
      border: InputBorder.none,
      counterText: '',
    ),
    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,
    this.mainAxisSize = MainAxisSize.max,
    this.autofillHints})
    : assert(fieldsCount > 0),
      super(key: key);