JsonTextFormField constructor
JsonTextFormField({
- Map<
String, dynamic> args = const {}, - JsonWidgetRegistry? registry,
- bool autocorrect = true,
- Iterable<
String> ? autofillHints, - bool autofocus = false,
- AutovalidateMode? autovalidateMode,
- Widget? buildCounter(
- BuildContext, {
- required int currentLength,
- required bool isFocused,
- required int? maxLength,
- bool canRequestFocus = true,
- Clip clipBehavior = Clip.hardEdge,
- ContentInsertionConfiguration? contentInsertionConfiguration,
- Widget contextMenuBuilder()?,
- required TextEditingController? controller,
- Color? cursorColor,
- double? cursorHeight,
- bool? cursorOpacityAnimates,
- Radius? cursorRadius,
- double cursorWidth = 2.0,
- required dynamic decoration,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool enableIMEPersonalizedLearning = true,
- bool? enableInteractiveSelection,
- bool enableSuggestions = true,
- bool? enabled,
- bool expands = false,
- FocusNode? focusNode,
- String? initialValue,
- List<
TextInputFormatter> ? inputFormatters, - Brightness? keyboardAppearance,
- TextInputType? keyboardType,
- TextMagnifierConfiguration? magnifierConfiguration,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- int? maxLines = 1,
- int? minLines,
- MouseCursor? mouseCursor,
- bool obscureText = false,
- String obscuringCharacter = '•',
- void onAppPrivateCommand()?,
- void onChanged()?,
- void onEditingComplete()?,
- void onFieldSubmitted()?,
- void onSaved()?,
- void onTap()?,
- void onTapOutside()?,
- bool readOnly = false,
- String? restorationId,
- bool scribbleEnabled = true,
- ScrollController? scrollController,
- EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
- ScrollPhysics? scrollPhysics,
- TextSelectionControls? selectionControls,
- BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
- BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
- bool? showCursor,
- SmartDashesType? smartDashesType,
- SmartQuotesType? smartQuotesType,
- SpellCheckConfiguration? spellCheckConfiguration,
- StrutStyle? strutStyle,
- TextStyle? style,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextDirection? textDirection,
- TextInputAction? textInputAction,
- UndoHistoryController? undoController,
- required dynamic validators,
Implementation
JsonTextFormField({
Map<String, dynamic> args = const {},
JsonWidgetRegistry? registry,
this.autocorrect = true,
this.autofillHints,
this.autofocus = false,
this.autovalidateMode,
this.buildCounter,
this.canRequestFocus = true,
this.clipBehavior = Clip.hardEdge,
this.contentInsertionConfiguration,
this.contextMenuBuilder,
required this.controller,
this.cursorColor,
this.cursorHeight,
this.cursorOpacityAnimates,
this.cursorRadius,
this.cursorWidth = 2.0,
required this.decoration,
this.dragStartBehavior = DragStartBehavior.start,
this.enableIMEPersonalizedLearning = true,
this.enableInteractiveSelection,
this.enableSuggestions = true,
this.enabled,
this.expands = false,
this.focusNode,
this.initialValue,
this.inputFormatters,
this.keyboardAppearance,
this.keyboardType,
this.magnifierConfiguration,
this.maxLength,
this.maxLengthEnforcement,
this.maxLines = 1,
this.minLines,
this.mouseCursor,
this.obscureText = false,
this.obscuringCharacter = '•',
this.onAppPrivateCommand,
this.onChanged,
this.onEditingComplete,
this.onFieldSubmitted,
this.onSaved,
this.onTap,
this.onTapOutside,
this.readOnly = false,
this.restorationId,
this.scribbleEnabled = true,
this.scrollController,
this.scrollPadding = const EdgeInsets.all(20.0),
this.scrollPhysics,
this.selectionControls,
this.selectionHeightStyle = BoxHeightStyle.tight,
this.selectionWidthStyle = BoxWidthStyle.tight,
this.showCursor,
this.smartDashesType,
this.smartQuotesType,
this.spellCheckConfiguration,
this.strutStyle,
this.style,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.textCapitalization = TextCapitalization.none,
this.textDirection,
this.textInputAction,
this.undoController,
required this.validators,
}) : super(
jsonWidgetArgs: JsonTextFormFieldBuilderModel.fromDynamic(
{
'autocorrect': autocorrect,
'autofillHints': autofillHints,
'autofocus': autofocus,
'autovalidateMode': autovalidateMode,
'buildCounter': buildCounter,
'canRequestFocus': canRequestFocus,
'clipBehavior': clipBehavior,
'contentInsertionConfiguration': contentInsertionConfiguration,
'contextMenuBuilder': contextMenuBuilder,
'controller': controller,
'cursorColor': cursorColor,
'cursorHeight': cursorHeight,
'cursorOpacityAnimates': cursorOpacityAnimates,
'cursorRadius': cursorRadius,
'cursorWidth': cursorWidth,
'decoration': decoration,
'dragStartBehavior': dragStartBehavior,
'enableIMEPersonalizedLearning': enableIMEPersonalizedLearning,
'enableInteractiveSelection': enableInteractiveSelection,
'enableSuggestions': enableSuggestions,
'enabled': enabled,
'expands': expands,
'focusNode': focusNode,
'initialValue': initialValue,
'inputFormatters': inputFormatters,
'keyboardAppearance': keyboardAppearance,
'keyboardType': keyboardType,
'magnifierConfiguration': magnifierConfiguration,
'maxLength': maxLength,
'maxLengthEnforcement': maxLengthEnforcement,
'maxLines': maxLines,
'minLines': minLines,
'mouseCursor': mouseCursor,
'obscureText': obscureText,
'obscuringCharacter': obscuringCharacter,
'onAppPrivateCommand': onAppPrivateCommand,
'onChanged': onChanged,
'onEditingComplete': onEditingComplete,
'onFieldSubmitted': onFieldSubmitted,
'onSaved': onSaved,
'onTap': onTap,
'onTapOutside': onTapOutside,
'readOnly': readOnly,
'restorationId': restorationId,
'scribbleEnabled': scribbleEnabled,
'scrollController': scrollController,
'scrollPadding': scrollPadding,
'scrollPhysics': scrollPhysics,
'selectionControls': selectionControls,
'selectionHeightStyle': selectionHeightStyle,
'selectionWidthStyle': selectionWidthStyle,
'showCursor': showCursor,
'smartDashesType': smartDashesType,
'smartQuotesType': smartQuotesType,
'spellCheckConfiguration': spellCheckConfiguration,
'strutStyle': strutStyle,
'style': style,
'textAlign': textAlign,
'textAlignVertical': textAlignVertical,
'textCapitalization': textCapitalization,
'textDirection': textDirection,
'textInputAction': textInputAction,
'undoController': undoController,
'validators': validators,
...args,
},
args: args,
registry: registry,
),
jsonWidgetBuilder: () => JsonTextFormFieldBuilder(
args: JsonTextFormFieldBuilderModel.fromDynamic(
{
'autocorrect': autocorrect,
'autofillHints': autofillHints,
'autofocus': autofocus,
'autovalidateMode': autovalidateMode,
'buildCounter': buildCounter,
'canRequestFocus': canRequestFocus,
'clipBehavior': clipBehavior,
'contentInsertionConfiguration': contentInsertionConfiguration,
'contextMenuBuilder': contextMenuBuilder,
'controller': controller,
'cursorColor': cursorColor,
'cursorHeight': cursorHeight,
'cursorOpacityAnimates': cursorOpacityAnimates,
'cursorRadius': cursorRadius,
'cursorWidth': cursorWidth,
'decoration': decoration,
'dragStartBehavior': dragStartBehavior,
'enableIMEPersonalizedLearning': enableIMEPersonalizedLearning,
'enableInteractiveSelection': enableInteractiveSelection,
'enableSuggestions': enableSuggestions,
'enabled': enabled,
'expands': expands,
'focusNode': focusNode,
'initialValue': initialValue,
'inputFormatters': inputFormatters,
'keyboardAppearance': keyboardAppearance,
'keyboardType': keyboardType,
'magnifierConfiguration': magnifierConfiguration,
'maxLength': maxLength,
'maxLengthEnforcement': maxLengthEnforcement,
'maxLines': maxLines,
'minLines': minLines,
'mouseCursor': mouseCursor,
'obscureText': obscureText,
'obscuringCharacter': obscuringCharacter,
'onAppPrivateCommand': onAppPrivateCommand,
'onChanged': onChanged,
'onEditingComplete': onEditingComplete,
'onFieldSubmitted': onFieldSubmitted,
'onSaved': onSaved,
'onTap': onTap,
'onTapOutside': onTapOutside,
'readOnly': readOnly,
'restorationId': restorationId,
'scribbleEnabled': scribbleEnabled,
'scrollController': scrollController,
'scrollPadding': scrollPadding,
'scrollPhysics': scrollPhysics,
'selectionControls': selectionControls,
'selectionHeightStyle': selectionHeightStyle,
'selectionWidthStyle': selectionWidthStyle,
'showCursor': showCursor,
'smartDashesType': smartDashesType,
'smartQuotesType': smartQuotesType,
'spellCheckConfiguration': spellCheckConfiguration,
'strutStyle': strutStyle,
'style': style,
'textAlign': textAlign,
'textAlignVertical': textAlignVertical,
'textCapitalization': textCapitalization,
'textDirection': textDirection,
'textInputAction': textInputAction,
'undoController': undoController,
'validators': validators,
...args,
},
args: args,
registry: registry,
),
),
jsonWidgetType: JsonTextFormFieldBuilder.kType,
);