PinPut constructor
const
PinPut({
- Key? key,
- required int fieldsCount,
- ValueChanged<
String> ? onSubmit, - FormFieldSetter<
String> ? onSaved, - ValueChanged<
String> ? onChanged, - VoidCallback? onTap,
- ValueChanged<
String?> ? onClipboardFound, - TextEditingController? controller,
- FocusNode? focusNode,
- Widget? preFilledWidget,
- List<
int> separatorPositions = const [], - Widget separator = const SizedBox(width: 15.0),
- TextStyle? textStyle,
- BoxDecoration? submittedFieldDecoration,
- BoxDecoration? selectedFieldDecoration,
- BoxDecoration? followingFieldDecoration,
- BoxDecoration? disabledDecoration,
- double? eachFieldWidth,
- double? eachFieldHeight,
- MainAxisAlignment fieldsAlignment = MainAxisAlignment.spaceBetween,
- AlignmentGeometry eachFieldAlignment = Alignment.center,
- EdgeInsetsGeometry? eachFieldMargin,
- EdgeInsetsGeometry? eachFieldPadding,
- BoxConstraints eachFieldConstraints = const BoxConstraints(minHeight: 40.0, minWidth: 40.0),
- InputDecoration? inputDecoration,
- Curve animationCurve = Curves.linear,
- Duration animationDuration = const Duration(milliseconds: 160),
- PinAnimationType pinAnimationType = PinAnimationType.slide,
- Offset? slideTransitionBeginOffset,
- bool enabled = true,
- bool checkClipboard = false,
- bool useNativeKeyboard = true,
- bool autofocus = false,
- AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
- bool withCursor = false,
- Widget? cursor,
- Brightness? keyboardAppearance,
- List<
TextInputFormatter> ? inputFormatters, - FormFieldValidator<
String> ? validator, - TextInputType keyboardType = TextInputType.number,
- String? obscureText,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextInputAction? textInputAction,
- ToolbarOptions? toolbarOptions = const ToolbarOptions(paste: true),
- MainAxisSize mainAxisSize = MainAxisSize.max,
- Iterable<
String> ? autofillHints, - bool enableIMEPersonalizedLearning = true,
- String? initialValue,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- bool enableSuggestions = true,
- MaxLengthEnforcement? maxLengthEnforcement,
- VoidCallback? onEditingComplete,
- double cursorWidth = 2,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- bool enableInteractiveSelection = true,
- TextSelectionControls? selectionControls,
- InputCounterWidgetBuilder? buildCounter,
- 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);