VxTextField constructor

const VxTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? hint,
  4. TextStyle? hintStyle,
  5. String? value,
  6. bool clear = true,
  7. bool isPassword = false,
  8. bool obscureText = false,
  9. VxTextFieldBorderType borderType = VxTextFieldBorderType.underLine,
  10. int? maxLine = 1,
  11. int? maxLength,
  12. TextAlign textAlign = TextAlign.left,
  13. Color? fillColor,
  14. Color? borderColor,
  15. Widget? prefixIcon,
  16. double height = 40,
  17. Widget? icon,
  18. double? borderRadius,
  19. double? contentPaddingLeft,
  20. double? contentPaddingTop,
  21. TextInputType? keyboardType,
  22. TextInputAction? textInputAction,
  23. List<TextInputFormatter>? inputFormatters,
  24. ValueChanged<String>? onChanged,
  25. ValueChanged<String>? onSubmitted,
  26. VoidCallback? onEditingComplete,
  27. FocusNode? focusNode,
  28. String? counterText,
  29. bool autofocus = false,
  30. TextStyle? style,
  31. String? labelText,
  32. TextStyle? labelStyle,
  33. Color? cursorColor,
  34. Color? suffixColor,
  35. bool autocorrect = true,
  36. double? cursorHeight,
  37. Radius? cursorRadius,
  38. double cursorWidth = 2.0,
  39. bool enableSuggestions = true,
  40. bool? enabled,
  41. bool? showCursor,
  42. Widget contextMenuBuilder(
    1. BuildContext,
    2. EditableTextState
    )?,
  43. dynamic onSaved(
    1. String?
    )?,
  44. String? validator(
    1. String?
    )?,
  45. AutovalidateMode? autovalidateMode,
  46. bool readOnly = false,
  47. String? initialValue,
})

Implementation

const VxTextField({
  super.key,
  this.controller,
  this.hint,
  this.hintStyle,
  this.value,
  this.clear = true,
  this.isPassword = false,
  this.obscureText = false,
  this.borderType = VxTextFieldBorderType.underLine,
  this.maxLine = 1,
  this.maxLength,
  this.textAlign = TextAlign.left,
  this.fillColor,
  this.borderColor,
  this.prefixIcon,
  this.height = 40,
  this.icon,
  this.borderRadius,
  this.contentPaddingLeft,
  this.contentPaddingTop,
  this.keyboardType,
  this.textInputAction,
  this.inputFormatters,
  this.onChanged,
  this.onSubmitted,
  this.onEditingComplete,
  this.focusNode,
  this.counterText,
  this.autofocus = false,
  this.style,
  this.labelText,
  this.labelStyle,
  this.cursorColor,
  this.suffixColor,
  this.autocorrect = true,
  this.cursorHeight,
  this.cursorRadius,
  this.cursorWidth = 2.0,
  this.enableSuggestions = true,
  this.enabled,
  this.showCursor,
  this.contextMenuBuilder,
  this.onSaved,
  this.validator,
  this.autovalidateMode,
  this.readOnly = false,
  this.initialValue,
}) : assert(initialValue == null || controller == null);