FCCTextField constructor
const
FCCTextField({
- Key? key,
- TextEditingController? controller,
- String? labelText,
- String? initialValue,
- IconData? prefixIcon,
- IconData? suffixIcon,
- VoidCallback? suffixIconCallback,
- Widget? suffixWidget,
- Widget? prefix,
- Widget? suffix,
- FormFieldValidator<
String> ? validator, - List<
FormFieldValidator< ? additionalValidators,String> > - bool readOnly = false,
- bool obscureText = false,
- Color? fillColor,
- double? fontSize,
- FontWeight? fontWeight,
- String? fontFamily,
- Color? textColor,
- TextStyle? style,
- TextAlign? textAlign,
- TextDirection? textDirection,
- VoidCallback? onTap,
- FocusNode? focusNode,
- TextInputType? keyboardType,
- ValueChanged<
String> ? onChanged, - Duration debounceDuration = const Duration(milliseconds: 300),
- ValueChanged<
String> ? onDebouncedChanged, - String? helperText,
- String? hintText,
- TextStyle? hintTextStyle,
- int? maxLines,
- bool isDate = false,
- bool isTime = false,
- bool isDateTime = false,
- String dateFormat = 'yyyy-MM-dd',
- String timeFormat = 'HH:mm:ss',
- DateTime? defaultDate,
- DateTime? minDate,
- DateTime? maxDate,
- bool autoFocus = false,
- TextInputAction? textInputAction,
- List<
TextInputFormatter> ? inputFormatters, - int? maxLength,
- ValueChanged<
String> ? onSubmitted, - bool enabled = true,
- Color? cursorColor,
- double? cursorWidth = 2.0,
- VoidCallback? onEditingComplete,
- TextCapitalization textCapitalization = TextCapitalization.none,
- bool showClearButton = false,
- bool use3DEffect = true,
- bool isPill = false,
- String? semanticLabel,
- bool enableFocusEffect = true,
- bool required = false,
- String? requiredMessage,
- AutovalidateMode? autoValidateMode,
- bool showBorder = true,
- String? tooltip,
- bool visible = true,
- bool autoTrimOnUnfocus = true,
- Future<
String?> asyncValidator(- String value
- Duration asyncValidationDebounce = const Duration(milliseconds: 400),
- FccValidationStyle validationStyleBuilder(
- BuildContext,
- String message
- bool showCharacterCounter = false,
- bool showLoading = false,
- Widget? loadingWidget,
- bool showStepper = false,
- double step = 1.0,
- double? minValue,
- double? maxValue,
- bool enableErrorAnimations = true,
- Duration errorAnimationDuration = const Duration(milliseconds: 380),
- FccAutoCapitalizeMode autoCapitalizeMode = FccAutoCapitalizeMode.none,
- bool enableFocusScaleAnimation = true,
- double focusScaleFactor = 1.02,
- bool useHoldToRevealPassword = true,
- FccInputMaskType? maskType,
- 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,
});