FormeFluentTextBox constructor

FormeFluentTextBox({
  1. Key? key,
  2. String? name,
  3. String initialValue = '',
  4. FormeAsyncValidator<String>? asyncValidator,
  5. Duration? asyncValidatorDebounce,
  6. AutovalidateMode? autovalidateMode,
  7. FormeFieldDecorator<String>? decorator,
  8. bool enabled = true,
  9. FocusNode? focusNode,
  10. FormeFieldInitialized<String>? onInitialized,
  11. FormeFieldSetter<String>? onSaved,
  12. FormeFieldStatusChanged<String>? onStatusChanged,
  13. int? order,
  14. bool quietlyValidate = false,
  15. bool readOnly = false,
  16. bool requestFocusOnUserInteraction = true,
  17. FormeFieldValidationFilter<String>? validationFilter,
  18. FormeValidator<String>? validator,
  19. bool autocorrect = true,
  20. Iterable<String>? autofillHints,
  21. bool autofocus = false,
  22. Clip clipBehavior = Clip.hardEdge,
  23. EditableTextContextMenuBuilder? contextMenuBuilder = _defaultContextMenuBuilder,
  24. TextEditingController? controller,
  25. Color? cursorColor,
  26. double? cursorHeight,
  27. Radius cursorRadius = const Radius.circular(2.0),
  28. double cursorWidth = 1,
  29. BoxDecoration? decoration,
  30. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  31. bool enableIMEPersonalizedLearning = true,
  32. bool? enableInteractiveSelection,
  33. bool enableSuggestions = true,
  34. bool scribbleEnabled = true,
  35. bool expands = false,
  36. BoxDecoration? foregroundDecoration,
  37. Color? highlightColor,
  38. List<TextInputFormatter>? inputFormatters,
  39. Brightness? keyboardAppearance,
  40. TextInputType? keyboardType,
  41. int? maxLength,
  42. MaxLengthEnforcement? maxLengthEnforcement,
  43. int? maxLines = 1,
  44. int? minLines,
  45. bool obscureText = false,
  46. String obscuringCharacter = '•',
  47. VoidCallback? onEditingComplete,
  48. ValueChanged<String>? onSubmitted,
  49. GestureTapCallback? onTap,
  50. TapRegionCallback? onTapOutside,
  51. EdgeInsetsGeometry padding = kTextBoxPadding,
  52. String? placeholder,
  53. TextStyle? placeholderStyle,
  54. Widget? prefix,
  55. OverlayVisibilityMode prefixMode = OverlayVisibilityMode.always,
  56. ScrollController? scrollController,
  57. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  58. String? restorationId,
  59. ScrollPhysics? scrollPhysics,
  60. bool selectAllOnFocus = false,
  61. TextSelectionControls? selectionControls,
  62. BoxHeightStyle selectionHeightStyle = BoxHeightStyle.tight,
  63. BoxWidthStyle selectionWidthStyle = BoxWidthStyle.tight,
  64. bool? showCursor,
  65. SmartDashesType? smartDashesType,
  66. SmartQuotesType? smartQuotesType,
  67. StrutStyle? strutStyle,
  68. TextStyle? style,
  69. Widget? suffix,
  70. OverlayVisibilityMode suffixMode = OverlayVisibilityMode.always,
  71. TextAlign textAlign = TextAlign.start,
  72. TextAlignVertical? textAlignVertical,
  73. TextCapitalization textCapitalization = TextCapitalization.none,
  74. TextDirection? textDirection,
  75. TextInputAction? textInputAction,
  76. Color? unfocusedColor,
  77. bool updateValueWhenComposing = false,
  78. TextMagnifierConfiguration? magnifierConfiguration,
  79. SpellCheckConfiguration? spellCheckConfiguration,
})

Implementation

FormeFluentTextBox({
  super.key,
  super.name,
  super.initialValue = '',
  super.asyncValidator,
  super.asyncValidatorDebounce,
  super.autovalidateMode,
  super.decorator,
  super.enabled = true,
  super.focusNode,
  super.onInitialized,
  super.onSaved,
  super.onStatusChanged,
  super.order,
  super.quietlyValidate = false,
  super.readOnly = false,
  super.requestFocusOnUserInteraction = true,
  super.validationFilter,
  super.validator,
  this.autocorrect = true,
  this.autofillHints,
  this.autofocus = false,
  this.clipBehavior = Clip.hardEdge,
  this.contextMenuBuilder = _defaultContextMenuBuilder,
  this.controller,
  this.cursorColor,
  this.cursorHeight,
  this.cursorRadius = const Radius.circular(2.0),
  this.cursorWidth = 1,
  this.decoration,
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableIMEPersonalizedLearning = true,
  this.enableInteractiveSelection,
  this.enableSuggestions = true,
  this.scribbleEnabled = true,
  this.expands = false,
  this.foregroundDecoration,
  this.highlightColor,
  this.inputFormatters,
  this.keyboardAppearance,
  this.keyboardType,
  this.maxLength,
  this.maxLengthEnforcement,
  this.maxLines = 1,
  this.minLines,
  this.obscureText = false,
  this.obscuringCharacter = '•',
  this.onEditingComplete,
  this.onSubmitted,
  this.onTap,
  this.onTapOutside,
  this.padding = kTextBoxPadding,
  this.placeholder,
  this.placeholderStyle,
  this.prefix,
  this.prefixMode = OverlayVisibilityMode.always,
  this.scrollController,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.restorationId,
  this.scrollPhysics,
  this.selectAllOnFocus = false,
  this.selectionControls,
  this.selectionHeightStyle = BoxHeightStyle.tight,
  this.selectionWidthStyle = BoxWidthStyle.tight,
  this.showCursor,
  this.smartDashesType,
  this.smartQuotesType,
  this.strutStyle,
  this.style,
  this.suffix,
  this.suffixMode = OverlayVisibilityMode.always,
  this.textAlign = TextAlign.start,
  this.textAlignVertical,
  this.textCapitalization = TextCapitalization.none,
  this.textDirection,
  this.textInputAction,
  this.unfocusedColor,
  this.updateValueWhenComposing = false,
  this.magnifierConfiguration,
  this.spellCheckConfiguration,
}) : super.allFields(builder: (state) {
        return TextBox(
          controller:
              (state as FormeFluentTextBoxState).textEditingController,
          focusNode: state.focusNode,
          decoration: decoration,
          foregroundDecoration: foregroundDecoration,
          highlightColor: highlightColor,
          unfocusedColor: unfocusedColor,
          padding: padding,
          placeholder: placeholder,
          placeholderStyle: placeholderStyle,
          prefix: prefix,
          prefixMode: prefixMode,
          suffix: suffix,
          suffixMode: suffixMode,
          keyboardType: keyboardType,
          textInputAction: textInputAction,
          textCapitalization: textCapitalization,
          textAlign: textAlign,
          textAlignVertical: textAlignVertical,
          textDirection: textDirection,
          readOnly: state.readOnly,
          showCursor: showCursor,
          autofocus: autofocus,
          obscuringCharacter: obscuringCharacter,
          obscureText: obscureText,
          autocorrect: autocorrect,
          smartDashesType: smartDashesType,
          smartQuotesType: smartQuotesType,
          enableSuggestions: enableSuggestions,
          maxLines: maxLines,
          minLines: minLines,
          expands: expands,
          maxLength: maxLength,
          maxLengthEnforcement: updateValueWhenComposing
              ? maxLengthEnforcement
              : MaxLengthEnforcement.truncateAfterCompositionEnds,
          onEditingComplete: onEditingComplete,
          onSubmitted: onSubmitted,
          onTapOutside: onTapOutside,
          inputFormatters: inputFormatters,
          enabled: state.enabled,
          cursorWidth: cursorWidth,
          cursorHeight: cursorHeight,
          cursorRadius: cursorRadius,
          cursorColor: cursorColor,
          selectionHeightStyle: selectionHeightStyle,
          selectionWidthStyle: selectionWidthStyle,
          keyboardAppearance: keyboardAppearance,
          scrollPadding: scrollPadding,
          dragStartBehavior: dragStartBehavior,
          enableInteractiveSelection: enableInteractiveSelection,
          selectionControls: selectionControls,
          onTap: onTap,
          scrollController: scrollController,
          scrollPhysics: scrollPhysics,
          autofillHints: autofillHints,
          clipBehavior: clipBehavior,
          scribbleEnabled: scribbleEnabled,
          enableIMEPersonalizedLearning: enableIMEPersonalizedLearning,
          contextMenuBuilder: contextMenuBuilder,
          spellCheckConfiguration: spellCheckConfiguration,
          magnifierConfiguration: magnifierConfiguration,
        );
      });