OtpPlusInputs constructor
const
OtpPlusInputs({
- Key? key,
- required OtpFieldShape shape,
- required int length,
- TextStyle? textStyle,
- void onCompleted(
- String code
- bool obscureText = false,
- bool? enabled,
- double horizontalSpacing = 12,
- double verticalSpacing = 12,
- Color cursorColor = Colors.black,
- TextDirection textDirection = TextDirection.ltr,
- UndoHistoryController? undoController,
- TextInputAction? textInputAction,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign textAlign = TextAlign.center,
- TextAlignVertical textAlignVertical = TextAlignVertical.center,
- String obscuringCharacter = '*',
- double size = 50,
- double cursorWidth = 1.5,
- EdgeInsets? contentPadding,
- bool? ignorePointers,
- double? cursorHeight,
- Radius? cursorRadius,
- bool? cursorOpacityAnimates,
- Color? borderColor,
- Color? focusedBorderColor,
- Color? errorBorderColor,
- void onChanged(
- String code
- void onSubmit(
- String code
Implementation
const OtpPlusInputs({
super.key,
required this.shape,
required this.length,
this.textStyle,
this.onCompleted,
this.obscureText = false,
this.enabled,
this.horizontalSpacing = 12,
this.verticalSpacing = 12,
this.cursorColor = Colors.black,
this.textDirection = TextDirection.ltr,
this.undoController,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.style,
this.strutStyle,
this.textAlign = TextAlign.center,
this.textAlignVertical = TextAlignVertical.center,
this.obscuringCharacter = '*',
this.size = 50,
this.cursorWidth = 1.5,
this.contentPadding,
this.ignorePointers,
this.cursorHeight,
this.cursorRadius,
this.cursorOpacityAnimates,
this.borderColor,
this.focusedBorderColor,
this.errorBorderColor,
this.onChanged,
this.onSubmit,
});