XTextField constructor

const XTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. TextStyle? textStyle,
  4. TextStyle? labelStyle,
  5. TextStyle? hintStyle,
  6. String? label,
  7. String? labelOnLine,
  8. String? hintText,
  9. bool isRequired = false,
  10. bool isEnable = true,
  11. Widget? prefixIcon,
  12. Widget? suffixIcon,
  13. TextInputType inputType = TextInputType.text,
  14. XTextFieldType fieldType = XTextFieldType.normal,
  15. TextCapitalization textCapitalization = TextCapitalization.sentences,
  16. int minLines = 1,
  17. int maxLines = 1,
  18. int maxLength = 500,
  19. bool isShowCounter = false,
  20. void onChanged(
    1. String
    )?,
  21. VoidCallback? onTap,
  22. TextInputAction textInputAction = TextInputAction.next,
  23. XTextFieldStyle? style,
  24. XTextFieldFileOptions? fileOptions,
  25. XTextFieldDropdownOptions? dropdownOptions,
  26. XTextFieldDatePickerOptions? datePickerOptions,
  27. XTextFieldTimePickerOptions? timePickerOptions,
  28. String? validator(
    1. String?
    )?,
  29. void onFileSelected(
    1. File?
    )?,
  30. void onDropdownChanged(
    1. dynamic
    )?,
  31. void onDateSelected(
    1. DateTime?
    )?,
  32. void onTimeSelected(
    1. TimeOfDay?
    )?,
  33. bool isReadOnly = false,
  34. bool isObscureText = false,
  35. TextAlign textAlign = TextAlign.start,
  36. EdgeInsets? contentPadding,
  37. AutovalidateMode? autovalidateMode,
  38. String? asyncErrorText,
  39. void onSaved(
    1. String?
    )?,
  40. FloatingLabelBehavior floatingLabelBehavior = .auto,
})

Creates a new customizable XTextField.

Implementation

const XTextField({
  super.key,
  this.controller,
  this.textStyle,
  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.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,
});