XTextField constructor
const
XTextField({
- Key? key,
- TextEditingController? controller,
- TextStyle? textStyle,
- TextStyle? labelStyle,
- TextStyle? hintStyle,
- String? label,
- String? labelOnLine,
- String? hintText,
- bool isRequired = false,
- bool isEnable = true,
- Widget? prefixIcon,
- Widget? suffixIcon,
- TextInputType inputType = TextInputType.text,
- XTextFieldType fieldType = XTextFieldType.normal,
- TextCapitalization textCapitalization = TextCapitalization.sentences,
- int minLines = 1,
- int maxLines = 1,
- int maxLength = 500,
- bool isShowCounter = false,
- void onChanged()?,
- VoidCallback? onTap,
- TextInputAction textInputAction = TextInputAction.next,
- XTextFieldStyle? style,
- XTextFieldFileOptions? fileOptions,
- XTextFieldDropdownOptions? dropdownOptions,
- XTextFieldDatePickerOptions? datePickerOptions,
- XTextFieldTimePickerOptions? timePickerOptions,
- String? validator()?,
- void onFileSelected(
- File?
- void onDropdownChanged(
- dynamic
- void onDateSelected()?,
- void onTimeSelected()?,
- bool isReadOnly = false,
- bool isObscureText = false,
- TextAlign textAlign = TextAlign.start,
- EdgeInsets? contentPadding,
- AutovalidateMode? autovalidateMode,
- String? asyncErrorText,
- void onSaved()?,
- 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,
});