XTextField constructor

const XTextField({
  1. Key? key,
  2. Object groupId = EditableText,
  3. String? restorationId,
  4. TextEditingController? controller,
  5. FocusNode? focusNode,
  6. InputDecoration? decoration,
  7. TextStyle? textStyle,
  8. StrutStyle? strutStyle,
  9. TextDirection? textDirection,
  10. TextAlignVertical? textAlignVertical,
  11. TextStyle? labelStyle,
  12. TextStyle? hintStyle,
  13. String? label,
  14. String? labelOnLine,
  15. String? hintText,
  16. bool isRequired = false,
  17. bool isEnable = true,
  18. Widget? prefixIcon,
  19. Widget? suffixIcon,
  20. TextInputType inputType = TextInputType.text,
  21. XTextFieldType fieldType = XTextFieldType.normal,
  22. TextCapitalization textCapitalization = TextCapitalization.sentences,
  23. int minLines = 1,
  24. int maxLines = 1,
  25. int maxLength = 500,
  26. bool isShowCounter = false,
  27. void onChanged(
    1. String
    )?,
  28. VoidCallback? onTap,
  29. bool onTapAlwaysCalled = false,
  30. TapRegionCallback? onTapOutside,
  31. TapRegionUpCallback? onTapUpOutside,
  32. VoidCallback? onEditingComplete,
  33. ValueChanged<String>? onFieldSubmitted,
  34. TextInputAction textInputAction = TextInputAction.next,
  35. XTextFieldStyle? style,
  36. XTextFieldFileOptions? fileOptions,
  37. XTextFieldDropdownOptions? dropdownOptions,
  38. XTextFieldDatePickerOptions? datePickerOptions,
  39. XTextFieldTimePickerOptions? timePickerOptions,
  40. String? validator(
    1. String?
    )?,
  41. void onFileSelected(
    1. File?
    )?,
  42. void onDropdownChanged(
    1. dynamic
    )?,
  43. void onDateSelected(
    1. DateTime?
    )?,
  44. void onTimeSelected(
    1. TimeOfDay?
    )?,
  45. bool isReadOnly = false,
  46. bool isObscureText = false,
  47. TextAlign textAlign = TextAlign.start,
  48. EdgeInsets? contentPadding,
  49. AutovalidateMode? autovalidateMode,
  50. String? asyncErrorText,
  51. void onSaved(
    1. String?
    )?,
  52. FloatingLabelBehavior floatingLabelBehavior = .auto,
  53. bool autofocus = false,
  54. bool? showCursor,
  55. String obscuringCharacter = '•',
  56. bool autocorrect = true,
  57. SmartDashesType? smartDashesType,
  58. SmartQuotesType? smartQuotesType,
  59. bool enableSuggestions = true,
  60. MaxLengthEnforcement? maxLengthEnforcement,
  61. bool expands = false,
  62. List<TextInputFormatter>? inputFormatters,
  63. bool? enabled,
  64. bool? ignorePointers,
  65. double cursorWidth = 2.0,
  66. double? cursorHeight,
  67. Radius? cursorRadius,
  68. Color? cursorColor = Colors.black87,
  69. Color? cursorErrorColor,
  70. Brightness? keyboardAppearance,
  71. EdgeInsets scrollPadding = const EdgeInsets.all(20.0),
  72. bool? enableInteractiveSelection,
  73. bool? selectAllOnFocus,
  74. TextSelectionControls? selectionControls,
  75. InputCounterWidgetBuilder? buildCounter,
  76. ScrollPhysics? scrollPhysics,
  77. Iterable<String>? autofillHints,
  78. ScrollController? scrollController,
  79. bool enableIMEPersonalizedLearning = true,
  80. MouseCursor? mouseCursor,
  81. EditableTextContextMenuBuilder? contextMenuBuilder,
  82. SpellCheckConfiguration? spellCheckConfiguration,
  83. TextMagnifierConfiguration? magnifierConfiguration,
  84. UndoHistoryController? undoController,
  85. AppPrivateCommandCallback? onAppPrivateCommand,
  86. bool? cursorOpacityAnimates,
  87. BoxHeightStyle? selectionHeightStyle,
  88. BoxWidthStyle? selectionWidthStyle,
  89. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  90. ContentInsertionConfiguration? contentInsertionConfiguration,
  91. MaterialStatesController? statesController,
  92. Clip clipBehavior = Clip.hardEdge,
  93. bool stylusHandwritingEnabled = EditableText.defaultStylusHandwritingEnabled,
  94. bool canRequestFocus = true,
  95. List<Locale>? hintLocales,
})

Creates a new customizable XTextField.

Implementation

const XTextField({
  super.key,
  this.groupId = EditableText,
  this.restorationId,
  this.controller,
  this.focusNode,
  this.decoration,
  this.textStyle,
  this.strutStyle,
  this.textDirection,
  this.textAlignVertical,
  this.labelStyle,
  this.hintStyle,
  this.label,
  this.labelOnLine,
  this.hintText,
  this.isRequired = false,
  this.isEnable = true,
  this.prefixIcon,
  this.suffixIcon,
  this.inputType = TextInputType.text,
  this.fieldType = XTextFieldType.normal,
  this.textCapitalization = TextCapitalization.sentences,
  this.minLines = 1,
  this.maxLines = 1,
  this.maxLength = 500,
  this.isShowCounter = false,
  this.onChanged,
  this.onTap,
  this.onTapAlwaysCalled = false,
  this.onTapOutside,
  this.onTapUpOutside,
  this.onEditingComplete,
  this.onFieldSubmitted,
  this.textInputAction = TextInputAction.next,
  this.style,
  this.fileOptions,
  this.dropdownOptions,
  this.datePickerOptions,
  this.timePickerOptions,
  this.validator,
  this.onFileSelected,
  this.onDropdownChanged,
  this.onDateSelected,
  this.onTimeSelected,
  this.isReadOnly = false,
  this.isObscureText = false,
  this.textAlign = TextAlign.start,
  this.contentPadding,
  this.autovalidateMode,
  this.asyncErrorText,
  this.onSaved,
  this.floatingLabelBehavior = .auto,
  this.autofocus = false,
  this.showCursor,
  this.obscuringCharacter = '•',
  this.autocorrect = true,
  this.smartDashesType,
  this.smartQuotesType,
  this.enableSuggestions = true,
  this.maxLengthEnforcement,
  this.expands = false,
  this.inputFormatters,
  this.enabled,
  this.ignorePointers,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorColor = Colors.black87,
  this.cursorErrorColor,
  this.keyboardAppearance,
  this.scrollPadding = const EdgeInsets.all(20.0),
  this.enableInteractiveSelection,
  this.selectAllOnFocus,
  this.selectionControls,
  this.buildCounter,
  this.scrollPhysics,
  this.autofillHints,
  this.scrollController,
  this.enableIMEPersonalizedLearning = true,
  this.mouseCursor,
  this.contextMenuBuilder,
  this.spellCheckConfiguration,
  this.magnifierConfiguration,
  this.undoController,
  this.onAppPrivateCommand,
  this.cursorOpacityAnimates,
  this.selectionHeightStyle,
  this.selectionWidthStyle,
  this.dragStartBehavior = DragStartBehavior.start,
  this.contentInsertionConfiguration,
  this.statesController,
  this.clipBehavior = Clip.hardEdge,
  this.stylusHandwritingEnabled =
      EditableText.defaultStylusHandwritingEnabled,
  this.canRequestFocus = true,
  this.hintLocales,
});