FMCvvField constructor
const
FMCvvField({
- Key? key,
- TextEditingController? controller,
- FocusNode? focusNode,
- InputDecoration? decoration = const InputDecoration(),
- TextInputAction? textInputAction,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextDirection? textDirection,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- bool autofocus = false,
- bool readOnly = false,
- bool? showCursor,
- ValueChanged<
String> ? onChanged, - GestureTapCallback? onTap,
- VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onFieldSubmitted, - void onSaved()?,
- bool? enabled,
- double cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- TextSelectionControls? selectionControls,
- ScrollPhysics? scrollPhysics,
- ScrollController? scrollController,
- String? restorationId,
- MouseCursor? mouseCursor,
CVV Field
Type: TextFormField
customized.
This is the field that controls the CVV validations which are immutable. Although other properties like decorations and more can be customized to fit needs.
Validations
- Takes only digits.
- Allows on a minimum of 3 characters and maximum of 4 characters.
- Can only be single line field.
- The keyboard type is always set to numbers.
- Validation are done automatically on user interaction.
Implementation
const FMCvvField({
super.key,
this.controller,
this.focusNode,
this.decoration = const InputDecoration(),
this.textInputAction,
this.style,
this.strutStyle,
this.textDirection,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.autofocus = false,
this.readOnly = false,
this.showCursor,
this.onChanged,
this.onTap,
this.onEditingComplete,
this.onFieldSubmitted,
this.onSaved,
this.enabled,
this.cursorWidth = 2.0,
this.cursorHeight,
this.cursorRadius,
this.cursorColor,
this.keyboardAppearance,
this.scrollPadding = const EdgeInsets.all(20.0),
this.selectionControls,
this.scrollPhysics,
this.scrollController,
this.restorationId,
this.mouseCursor,
});