FCCTextField constructor

const FCCTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? labelText,
  4. String? initialValue,
  5. IconData? prefixIcon,
  6. IconData? suffixIcon,
  7. VoidCallback? suffixIconCallback,
  8. Widget? suffixWidget,
  9. Widget? prefix,
  10. Widget? suffix,
  11. FormFieldValidator<String>? validator,
  12. List<FormFieldValidator<String>>? additionalValidators,
  13. bool readOnly = false,
  14. bool obscureText = false,
  15. Color? fillColor,
  16. double? fontSize,
  17. FontWeight? fontWeight,
  18. String? fontFamily,
  19. Color? textColor,
  20. TextStyle? style,
  21. TextAlign? textAlign,
  22. TextDirection? textDirection,
  23. VoidCallback? onTap,
  24. FocusNode? focusNode,
  25. TextInputType? keyboardType,
  26. ValueChanged<String>? onChanged,
  27. Duration debounceDuration = const Duration(milliseconds: 300),
  28. ValueChanged<String>? onDebouncedChanged,
  29. String? helperText,
  30. String? hintText,
  31. TextStyle? hintTextStyle,
  32. int? maxLines,
  33. bool isDate = false,
  34. bool isTime = false,
  35. bool isDateTime = false,
  36. String dateFormat = 'yyyy-MM-dd',
  37. String timeFormat = 'HH:mm:ss',
  38. DateTime? defaultDate,
  39. DateTime? minDate,
  40. DateTime? maxDate,
  41. bool autoFocus = false,
  42. TextInputAction? textInputAction,
  43. List<TextInputFormatter>? inputFormatters,
  44. int? maxLength,
  45. ValueChanged<String>? onSubmitted,
  46. bool enabled = true,
  47. Color? cursorColor,
  48. double? cursorWidth = 2.0,
  49. VoidCallback? onEditingComplete,
  50. TextCapitalization textCapitalization = TextCapitalization.none,
  51. bool showClearButton = false,
  52. bool use3DEffect = true,
  53. bool isPill = false,
  54. String? semanticLabel,
  55. bool enableFocusEffect = true,
  56. bool required = false,
  57. String? requiredMessage,
  58. AutovalidateMode? autoValidateMode,
  59. bool showBorder = true,
  60. String? tooltip,
  61. bool visible = true,
  62. bool autoTrimOnUnfocus = true,
  63. Future<String?> asyncValidator(
    1. String value
    )?,
  64. Duration asyncValidationDebounce = const Duration(milliseconds: 400),
  65. FccValidationStyle validationStyleBuilder(
    1. BuildContext,
    2. String message
    )?,
  66. bool showCharacterCounter = false,
  67. bool showLoading = false,
  68. Widget? loadingWidget,
  69. bool showStepper = false,
  70. double step = 1.0,
  71. double? minValue,
  72. double? maxValue,
  73. bool enableErrorAnimations = true,
  74. Duration errorAnimationDuration = const Duration(milliseconds: 380),
  75. FccAutoCapitalizeMode autoCapitalizeMode = FccAutoCapitalizeMode.none,
  76. bool enableFocusScaleAnimation = true,
  77. double focusScaleFactor = 1.02,
  78. bool useHoldToRevealPassword = true,
  79. FccInputMaskType? maskType,
  80. TextInputFormatter? maskFormatter,
})

Implementation

const FCCTextField({
  super.key,
  this.controller,
  this.labelText,
  this.initialValue,
  this.prefixIcon,
  this.suffixIcon,
  this.suffixIconCallback,
  this.suffixWidget,
  this.prefix,
  this.suffix,
  this.validator,
  this.additionalValidators,
  this.readOnly = false,
  this.obscureText = false,
  this.fillColor,
  this.fontSize,
  this.fontWeight,
  this.fontFamily,
  this.textColor,
  this.style,
  this.textAlign,
  this.textDirection,
  this.onTap,
  this.focusNode,
  this.keyboardType,
  this.onChanged,
  this.debounceDuration = const Duration(milliseconds: 300),
  this.onDebouncedChanged,
  this.helperText,
  this.hintText,
  this.hintTextStyle,
  this.maxLines,
  this.isDate = false,
  this.isTime = false,
  this.isDateTime = false,
  this.dateFormat = 'yyyy-MM-dd',
  this.timeFormat = 'HH:mm:ss',
  this.defaultDate,
  this.minDate,
  this.maxDate,
  this.autoFocus = false,
  this.textInputAction,
  this.inputFormatters,
  this.maxLength,
  this.onSubmitted,
  this.enabled = true,
  this.cursorColor,
  this.cursorWidth = 2.0,
  this.onEditingComplete,
  this.textCapitalization = TextCapitalization.none,
  this.showClearButton = false,
  this.use3DEffect = true,
  this.isPill = false,
  this.semanticLabel,
  this.enableFocusEffect = true,
  this.required = false,
  this.requiredMessage,
  this.autoValidateMode,
  this.showBorder = true,
  this.tooltip,
  this.visible = true,
  this.autoTrimOnUnfocus = true,
  this.asyncValidator,
  this.asyncValidationDebounce = const Duration(milliseconds: 400),
  this.validationStyleBuilder,
  this.showCharacterCounter = false,
  this.showLoading = false,
  this.loadingWidget,
  this.showStepper = false,
  this.step = 1.0,
  this.minValue,
  this.maxValue,
  this.enableErrorAnimations = true,
  this.errorAnimationDuration = const Duration(milliseconds: 380),
  this.autoCapitalizeMode = FccAutoCapitalizeMode.none,
  this.enableFocusScaleAnimation = true,
  this.focusScaleFactor = 1.02,
  this.useHoldToRevealPassword = true,
  this.maskType,
  this.maskFormatter,
});