AppTextField constructor

const AppTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. FocusNode? focusNode,
  4. void onChanged(
    1. String
    )?,
  5. void onSubmitted(
    1. String
    )?,
  6. VoidCallback? onTap,
  7. VoidCallback? onEditingComplete,
  8. void onSaved(
    1. String?
    )?,
  9. String? validator(
    1. String?
    )?,
  10. void onFocusChanged(
    1. bool
    )?,
  11. TextFieldStyle fieldStyle = TextFieldStyle.outlined,
  12. LabelPosition labelPosition = LabelPosition.above,
  13. String? label,
  14. String? hint,
  15. String? helperText,
  16. String? errorText,
  17. String? counterText,
  18. String? prefixText,
  19. String? suffixText,
  20. double? height,
  21. double? width,
  22. EdgeInsetsGeometry? contentPadding,
  23. double? borderRadius,
  24. double? borderWidth,
  25. double? labelSpacing,
  26. Color? backgroundColor,
  27. Color? focusedBackgroundColor,
  28. Color? disabledBackgroundColor,
  29. Color? borderColor,
  30. Color? focusedBorderColor,
  31. Color? errorBorderColor,
  32. Color? textColor,
  33. Color? hintColor,
  34. Color? labelColor,
  35. Color? errorColor,
  36. Color? cursorColor,
  37. Color? iconColor,
  38. Color? focusedIconColor,
  39. Color? prefixTextColor,
  40. Color? suffixTextColor,
  41. double? fontSize,
  42. FontWeight? fontWeight,
  43. String? fontFamily,
  44. double? labelFontSize,
  45. FontWeight? labelFontWeight,
  46. double? hintFontSize,
  47. TextStyle? textStyle,
  48. TextStyle? labelStyle,
  49. TextStyle? hintStyle,
  50. TextStyle? errorStyle,
  51. TextStyle? helperStyle,
  52. TextStyle? counterStyle,
  53. Widget? prefixIcon,
  54. Widget? suffixIcon,
  55. IconData? prefixIconData,
  56. IconData? suffixIconData,
  57. double? prefixIconSize,
  58. double? suffixIconSize,
  59. Color? prefixIconColor,
  60. Color? suffixIconColor,
  61. TextInputType? keyboardType,
  62. TextInputAction? textInputAction,
  63. TextCapitalization textCapitalization = TextCapitalization.none,
  64. bool autofocus = false,
  65. bool readOnly = false,
  66. bool enabled = true,
  67. bool enableSuggestions = true,
  68. bool autocorrect = true,
  69. bool? showCursor,
  70. bool obscureText = false,
  71. String obscuringCharacter = '•',
  72. bool showPasswordToggle = false,
  73. Widget? passwordVisibleIcon,
  74. Widget? passwordHiddenIcon,
  75. int? maxLength,
  76. int? maxLines = 1,
  77. int? minLines,
  78. bool expands = false,
  79. bool showCounter = false,
  80. List<TextInputFormatter>? inputFormatters,
  81. Iterable<String>? autofillHints,
  82. AutovalidateMode? autovalidateMode,
  83. bool isRequired = false,
  84. Color? requiredIndicatorColor,
  85. bool isLoading = false,
  86. Widget? loadingWidget,
  87. String? semanticsLabel,
  88. bool? enableSecurity,
})

Implementation

const AppTextField({
  super.key,
  // ============== Controllers & Focus ==============
  this.controller,
  this.focusNode,
  // ============== Callbacks ==============
  this.onChanged,
  this.onSubmitted,
  this.onTap,
  this.onEditingComplete,
  this.onSaved,
  this.validator,
  this.onFocusChanged,
  // ============== Style Configuration ==============
  this.fieldStyle = TextFieldStyle.outlined,
  this.labelPosition = LabelPosition.above,
  // ============== Text Configuration ==============
  this.label,
  this.hint,
  this.helperText,
  this.errorText,
  this.counterText,
  this.prefixText,
  this.suffixText,
  // ============== Size Configuration ==============
  this.height,
  this.width,
  this.contentPadding,
  this.borderRadius,
  this.borderWidth,
  this.labelSpacing,
  // ============== Color Configuration ==============
  this.backgroundColor,
  this.focusedBackgroundColor,
  this.disabledBackgroundColor,
  this.borderColor,
  this.focusedBorderColor,
  this.errorBorderColor,
  this.textColor,
  this.hintColor,
  this.labelColor,
  this.errorColor,
  this.cursorColor,
  this.iconColor,
  this.focusedIconColor,
  this.prefixTextColor,
  this.suffixTextColor,
  // ============== Typography Configuration ==============
  this.fontSize,
  this.fontWeight,
  this.fontFamily,
  this.labelFontSize,
  this.labelFontWeight,
  this.hintFontSize,
  this.textStyle,
  this.labelStyle,
  this.hintStyle,
  this.errorStyle,
  this.helperStyle,
  this.counterStyle,
  // ============== Icon Configuration ==============
  this.prefixIcon,
  this.suffixIcon,
  this.prefixIconData,
  this.suffixIconData,
  this.prefixIconSize,
  this.suffixIconSize,
  this.prefixIconColor,
  this.suffixIconColor,
  // ============== Keyboard Configuration ==============
  this.keyboardType,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.autofocus = false,
  this.readOnly = false,
  this.enabled = true,
  this.enableSuggestions = true,
  this.autocorrect = true,
  this.showCursor,
  // ============== Password Configuration ==============
  this.obscureText = false,
  this.obscuringCharacter = '•',
  this.showPasswordToggle = false,
  this.passwordVisibleIcon,
  this.passwordHiddenIcon,
  // ============== Input Configuration ==============
  this.maxLength,
  this.maxLines = 1,
  this.minLines,
  this.expands = false,
  this.showCounter = false,
  this.inputFormatters,
  this.autofillHints,
  // ============== Validation Configuration ==============
  this.autovalidateMode,
  this.isRequired = false,
  this.requiredIndicatorColor,
  // ============== State Configuration ==============
  this.isLoading = false,
  this.loadingWidget,
  // ============== Accessibility ==============
  this.semanticsLabel,
  // ============== Security ==============
  this.enableSecurity,
});