JsonTextFormField constructor

JsonTextFormField({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. bool autocorrect = true,
  4. Iterable<String>? autofillHints,
  5. bool autofocus = false,
  6. AutovalidateMode? autovalidateMode,
  7. Widget? buildCounter(
    1. BuildContext, {
    2. required int currentLength,
    3. required bool isFocused,
    4. required int? maxLength,
    })?,
  8. bool canRequestFocus = true,
  9. Clip clipBehavior = Clip.hardEdge,
  10. ContentInsertionConfiguration? contentInsertionConfiguration,
  11. Widget contextMenuBuilder(
    1. BuildContext,
    2. EditableTextState
    )?,
  12. required TextEditingController? controller,
  13. Color? cursorColor,
  14. double? cursorHeight,
  15. bool? cursorOpacityAnimates,
  16. Radius? cursorRadius,
  17. double cursorWidth = 2.0,
  18. required dynamic decoration,
  19. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  20. bool enableIMEPersonalizedLearning = true,
  21. bool? enableInteractiveSelection,
  22. bool enableSuggestions = true,
  23. bool? enabled,
  24. bool expands = false,
  25. FocusNode? focusNode,
  26. String? initialValue,
  27. List<TextInputFormatter>? inputFormatters,
  28. Brightness? keyboardAppearance,
  29. TextInputType? keyboardType,
  30. TextMagnifierConfiguration? magnifierConfiguration,
  31. int? maxLength,
  32. MaxLengthEnforcement? maxLengthEnforcement,
  33. int? maxLines = 1,
  34. int? minLines,
  35. MouseCursor? mouseCursor,
  36. bool obscureText = false,
  37. String obscuringCharacter = '•',
  38. void onAppPrivateCommand(
    1. String,
    2. Map<String, dynamic>
    )?,
  39. void onChanged(
    1. String
    )?,
  40. void onEditingComplete()?,
  41. void onFieldSubmitted(
    1. String
    )?,
  42. void onSaved(
    1. String?
    )?,
  43. void onTap()?,
  44. void onTapOutside(
    1. PointerDownEvent
    )?,
  45. bool readOnly = false,
  46. String? restorationId,
  47. bool scribbleEnabled = true,
  48. ScrollController? scrollController,
  49. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  50. ScrollPhysics? scrollPhysics,
  51. TextSelectionControls? selectionControls,
  52. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  53. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  54. bool? showCursor,
  55. SmartDashesType? smartDashesType,
  56. SmartQuotesType? smartQuotesType,
  57. SpellCheckConfiguration? spellCheckConfiguration,
  58. StrutStyle? strutStyle,
  59. TextStyle? style,
  60. TextAlign textAlign = TextAlign.start,
  61. TextAlignVertical? textAlignVertical,
  62. TextCapitalization textCapitalization = TextCapitalization.none,
  63. TextDirection? textDirection,
  64. TextInputAction? textInputAction,
  65. UndoHistoryController? undoController,
  66. 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,
      );