TextFieldWidget constructor
const
TextFieldWidget({
- Key? key,
- String? validator(
- String? value
- int? maxLines,
- TextStyle? textStyle,
- double? labelFontSize,
- VoidCallback? onTap,
- bool obscureText = false,
- TextAlign textAlign = TextAlign.start,
- bool enabled = true,
- VoidCallbackWithValue<
String> ? onSaved, - VoidCallbackWithValue<
String> ? onFieldSubmitted, - VoidCallbackWithValue<
String> ? onChanged, - List<
TextInputFormatter> ? inputFormatters, - TextEditingController? controller,
- String? initialValue,
- TextInputType? keyboardType,
- int? minLines,
- int? maxLength,
- bool readOnly = false,
- InputDecoration? decoration,
- String? labelText,
- String? hintText,
- Widget? prefixIcon,
- Widget? suffixIcon,
- bool isPassword = false,
- FocusNode? focusNode,
- TextInputAction? textInputAction,
- bool showCursor = false,
- ColorModel? labelTextColor,
- FontWeight? fontWeight,
Implementation
const TextFieldWidget({
super.key,
this.validator,
this.maxLines,
this.textStyle,
this.labelFontSize,
this.onTap,
this.obscureText = false,
this.textAlign = TextAlign.start,
this.enabled = true,
this.onSaved,
this.onFieldSubmitted,
this.onChanged,
this.inputFormatters,
this.controller,
this.initialValue,
this.keyboardType,
this.minLines,
this.maxLength,
this.readOnly = false,
this.decoration,
this.labelText,
this.hintText,
this.prefixIcon,
this.suffixIcon,
this.isPassword = false,
this.focusNode,
this.textInputAction,
this.showCursor = false,
this.labelTextColor,
this.fontWeight,
}) : assert(
!(initialValue != null && controller != null),
'IF value has been set on initialValue then,'
' controller value must be null'
'or, IF value has been set on controller then,'
' initial value must be null');