SeniorTextField constructor
const
SeniorTextField({
- Key? key,
- bool autocorrect = true,
- bool autofocus = false,
- AutovalidateMode? autovalidateMode,
- TextEditingController? controller,
- String? counterText,
- bool disabled = false,
- bool enableSuggestions = true,
- FocusNode? focusNode,
- String? helper,
- String? hintText,
- String? initialValue,
- List<
TextInputFormatter> ? inputFormatters, - TextInputType? keyboardType,
- String? label,
- int? maxLength,
- int? maxLines,
- int? minLines,
- bool obscureText = false,
- dynamic onChanged()?,
- VoidCallback? onEditingComplete,
- dynamic onFieldSubmitted()?,
- void onSaved()?,
- VoidCallback? onTap,
- void onTapOutside()?,
- IconData? prefixIcon,
- Widget? prefixWidget,
- bool readOnly = false,
- bool showCounterText = false,
- SeniorTextFieldStyle? style,
- IconData? suffixIcon,
- IconData? sufixIcon,
- Widget? suffixWidget,
- Widget? sufixWidget,
- TextInputAction? textInputAction,
- String? validator()?,
Implementation
const SeniorTextField({
super.key,
this.autocorrect = true,
this.autofocus = false,
this.autovalidateMode,
this.controller,
this.counterText,
this.disabled = false,
this.enableSuggestions = true,
this.focusNode,
this.helper,
this.hintText,
this.initialValue,
this.inputFormatters,
this.keyboardType,
this.label,
this.maxLength,
this.maxLines,
this.minLines,
this.obscureText = false,
this.onChanged,
this.onEditingComplete,
this.onFieldSubmitted,
this.onSaved,
this.onTap,
this.onTapOutside,
this.prefixIcon,
this.prefixWidget,
this.readOnly = false,
this.showCounterText = false,
this.style,
this.suffixIcon,
this.sufixIcon,
this.suffixWidget,
this.sufixWidget,
this.textInputAction,
this.validator,
}) : assert(
!(showCounterText && maxLength == null),
'You cannot set showCounterText as true if maxLength was not specified',
),
assert(
!(prefixIcon != null && prefixWidget != null),
'You cannot use prefixIcon and prefixWidget at the same time',
),
assert(
!((suffixIcon != null || sufixIcon != null) && (suffixWidget != null || sufixWidget != null)),
'You cannot use suffixIcon and suffixWidget at the same time',
);