UiTextField constructor

const UiTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? label,
  4. String? hintText,
  5. bool obscureText = false,
  6. bool enableObscureToggle = false,
  7. TextInputType keyboardType = TextInputType.text,
  8. TextInputAction? textInputAction,
  9. Widget? prefixIcon,
  10. Widget? suffixIcon,
  11. BoxConstraints? prefixIconConstraints,
  12. BoxConstraints? suffixIconConstraints,
  13. String? validator(
    1. String?
    )?,
  14. InputBorder? border,
  15. EdgeInsetsGeometry? contentPadding,
  16. Color? fillColor,
  17. bool filled = true,
  18. bool enabled = true,
  19. TextStyle? textStyle,
  20. TextStyle? hintStyle,
  21. TextStyle? labelStyle,
  22. TextStyle? errorStyle,
  23. TextStyle? helperStyle,
  24. FloatingLabelBehavior floatingLabelBehavior = FloatingLabelBehavior.auto,
  25. bool autoFocus = false,
  26. int? maxLines = 1,
  27. int? minLines,
  28. List<TextInputFormatter>? inputFormatters,
  29. String? errorText,
  30. String? helperText,
  31. FocusNode? focusNode,
  32. IconData obscureIcon = Icons.visibility_off,
  33. IconData visibleIcon = Icons.visibility,
  34. double borderRadius = 12.0,
  35. Color borderColor = Colors.grey,
  36. double borderWidth = 1.0,
  37. UiTextFieldBorder? borderConfig,
  38. ValueChanged<String>? onChanged,
  39. VoidCallback? onEditingComplete,
  40. ValueChanged<String>? onSubmitted,
  41. GestureTapCallback? onTap,
  42. bool autocorrect = true,
  43. bool enableSuggestions = true,
  44. TextStyle? counterStyle,
  45. int? maxLength,
  46. bool showCounter = false,
  47. Color? cursorColor,
  48. double? cursorWidth = 2.0,
  49. double? cursorHeight,
  50. Radius? cursorRadius,
  51. bool enableInteractiveSelection = true,
  52. 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,
});