FormCraftTextField constructor
const
FormCraftTextField({
- required Key globalKey,
- required dynamic onChanged(
- String value
- List<
FormCraftValidator> ? validators, - String? initialValue,
- UndoHistoryController? undoController,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- bool readOnly = false,
- Widget contextMenuBuilder()?,
- bool? showCursor,
- String obscuringCharacter = '•',
- bool autofocus = false,
- bool obscureText = false,
- bool autocorrect = true,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- int? minLines,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- void onEditingComplete()?,
- void onSubmitted()?,
- void onAppPrivateCommand()?,
- List<
TextInputFormatter> ? inputFormatters, - bool? enabled,
- double? cursorHeight,
- Radius? cursorRadius,
- bool? cursorOpacityAnimates,
- Color? cursorColor,
- Brightness? keyboardAppearance,
- bool? enableInteractiveSelection,
- TextSelectionControls? selectionControls,
- void onTap()?,
- void onTapOutside()?,
- MouseCursor? mouseCursor,
- Widget? buildCounter(
- BuildContext, {
- required int currentLength,
- required bool isFocused,
- required int? maxLength,
- ScrollController? scrollController,
- ScrollPhysics? scrollPhysics,
- ContentInsertionConfiguration? contentInsertionConfiguration,
- String? restorationId,
- SpellCheckConfiguration? spellCheckConfiguration,
- TextMagnifierConfiguration? magnifierConfiguration,
- InputDecoration decorationBuilder(
- String? errorMessage
- bool enableSuggestions = true,
- int? maxLines = 1,
- double cursorWidth = 2.0,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- BoxHeightStyle selectionHeightStyle = ui.BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = ui.BoxWidthStyle.tight,
- bool expands = false,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- Iterable<
String> ? autofillHints = const <String>[], - Clip clipBehavior = Clip.hardEdge,
- bool scribbleEnabled = true,
- bool enableIMEPersonalizedLearning = true,
- bool canRequestFocus = true,
- String? customErrorMessage,
Implementation
const FormCraftTextField({
required this.globalKey,
required this.onChanged,
this.validators,
this.initialValue,
this.undoController,
this.keyboardType,
this.textInputAction,
this.textCapitalization = TextCapitalization.none,
this.style,
this.strutStyle,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.textDirection,
this.readOnly = false,
this.contextMenuBuilder,
this.showCursor,
this.obscuringCharacter = '•',
this.autofocus = false,
this.obscureText = false,
this.autocorrect = true,
this.smartDashesType,
this.smartQuotesType,
this.minLines,
this.maxLength,
this.maxLengthEnforcement,
this.onEditingComplete,
this.onSubmitted,
this.onAppPrivateCommand,
this.inputFormatters,
this.enabled,
this.cursorHeight,
this.cursorRadius,
this.cursorOpacityAnimates,
this.cursorColor,
this.keyboardAppearance,
this.enableInteractiveSelection,
this.selectionControls,
this.onTap,
this.onTapOutside,
this.mouseCursor,
this.buildCounter,
this.scrollController,
this.scrollPhysics,
this.contentInsertionConfiguration,
this.restorationId,
this.spellCheckConfiguration,
this.magnifierConfiguration,
this.decorationBuilder,
this.enableSuggestions = true,
this.maxLines = 1,
this.cursorWidth = 2.0,
this.scrollPadding = const EdgeInsets.all(20.0),
this.selectionHeightStyle = ui.BoxHeightStyle.tight,
this.selectionWidthStyle = ui.BoxWidthStyle.tight,
this.expands = false,
this.dragStartBehavior = DragStartBehavior.start,
this.autofillHints = const <String>[],
this.clipBehavior = Clip.hardEdge,
this.scribbleEnabled = true,
this.enableIMEPersonalizedLearning = true,
this.canRequestFocus = true,
this.customErrorMessage,
}) : super(key: globalKey);