UiTextField constructor
const
UiTextField({
- Key? key,
- TextEditingController? controller,
- String? label,
- String? hintText,
- bool obscureText = false,
- bool enableObscureToggle = false,
- TextInputType keyboardType = TextInputType.text,
- TextInputAction? textInputAction,
- Widget? prefixIcon,
- Widget? suffixIcon,
- BoxConstraints? prefixIconConstraints,
- BoxConstraints? suffixIconConstraints,
- String? validator()?,
- InputBorder? border,
- EdgeInsetsGeometry? contentPadding,
- Color? fillColor,
- bool filled = true,
- bool enabled = true,
- TextStyle? textStyle,
- TextStyle? hintStyle,
- TextStyle? labelStyle,
- TextStyle? errorStyle,
- TextStyle? helperStyle,
- FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
- bool autoFocus = false,
- int? maxLines = 1,
- int? minLines,
- List<
TextInputFormatter> ? inputFormatters, - String? errorText,
- String? helperText,
- FocusNode? focusNode,
- IconData obscureIcon = Icons.visibility_off,
- IconData visibleIcon = Icons.visibility,
- double borderRadius = 12.0,
- Color borderColor = Colors.grey,
- double borderWidth = 1.0,
- UiTextFieldBorder? borderConfig,
- ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - GestureTapCallback? onTap,
- bool autocorrect = true,
- bool enableSuggestions = true,
- TextStyle? counterStyle,
- int? maxLength,
- bool showCounter = false,
- Color? cursorColor,
- double? cursorWidth = 2.0,
- double? cursorHeight,
- Radius? cursorRadius,
- bool enableInteractiveSelection = true,
- InputCounterWidgetBuilder? buildCounter,
Creates a modern, customizable text field
Implementation
const UiTextField({
super.key,
this.controller,
this.label,
this.hintText,
this.obscureText = false,
this.enableObscureToggle = false,
this.keyboardType = TextInputType.text,
this.textInputAction,
this.prefixIcon,
this.suffixIcon,
this.prefixIconConstraints,
this.suffixIconConstraints,
this.validator,
this.border,
this.contentPadding,
this.fillColor,
this.filled = true,
this.enabled = true,
this.textStyle,
this.hintStyle,
this.labelStyle,
this.errorStyle,
this.helperStyle,
this.floatingLabelBehavior = FloatingLabelBehavior.auto,
this.autoFocus = false,
this.maxLines = 1,
this.minLines,
this.inputFormatters,
this.errorText,
this.helperText,
this.focusNode,
this.obscureIcon = Icons.visibility_off,
this.visibleIcon = Icons.visibility,
this.borderRadius = 12.0,
this.borderColor = Colors.grey,
this.borderWidth = 1.0,
this.borderConfig,
this.onChanged,
this.onEditingComplete,
this.onSubmitted,
this.onTap,
this.autocorrect = true,
this.enableSuggestions = true,
this.counterStyle,
this.maxLength,
this.showCounter = false,
this.cursorColor,
this.cursorWidth = 2.0,
this.cursorHeight,
this.cursorRadius,
this.enableInteractiveSelection = true,
this.buildCounter,
});