TextFormFields constructor
const
TextFormFields({
- Key? key,
- String? hintText,
- TextAlign textAlign = TextAlign.start,
- bool enabled = true,
- bool readOnly = false,
- TextEditingController? textEditingController,
- EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16),
- bool autoFocus = false,
- int maxLines = 1,
- int minLines = 1,
- bool obscureText = false,
- TextInputAction textInputAction = TextInputAction.next,
- String label = '',
- TextStyle? labelStyle,
- TextStyle? fieldStyle,
- TextStyle? hintStyle,
- TextStyle? errorStyle,
- Color borderColor = Colors.grey,
- Color focusColor = Colors.green,
- Color cursorColor = Colors.green,
- Color focusBorderColor = Colors.green,
- FocusNode? focusNode,
- TextInputType textInputType = TextInputType.text,
- InputDecoration? decoration,
- bool dense = true,
- Widget? icon,
- Widget? image,
- Widget? suffixIcon,
- Widget? prefixIcon,
- dynamic onChanged(
- String s
- String? validator(
- String? s
- dynamic onSaved(
- String? s
- dynamic onFieldSubmitted(
- String s
- List<
TextInputFormatter> ? inputFormatter, - dynamic onEditingComplete()?,
- dynamic onTap()?,
- String obscuringCharacter = '•',
- bool filled = true,
- Color fillColor = Colors.white,
- bool isBorder = true,
- bool isPrefix = false,
- String? prefixText,
- String suffixText = '',
- BoxConstraints? suffixIconConstraints,
- BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10.0)),
- InputBorderType? borderType = InputBorderType.outline,
- TextStyle? prefixStyle,
- TextStyle? suffixStyle,
- String? errorText,
Implementation
const TextFormFields({
super.key,
this.hintText,
this.textAlign = TextAlign.start,
this.enabled = true,
this.readOnly = false,
this.textEditingController,
this.contentPadding = const EdgeInsets.all(16),
// this.initialValue,
this.autoFocus = false,
this.maxLines = 1,
this.minLines = 1,
this.obscureText = false,
this.textInputAction = TextInputAction.next,
this.label = '',
this.labelStyle,
this.fieldStyle,
this.hintStyle,
this.errorStyle,
this.borderColor = Colors.grey,
this.focusColor = Colors.green,
this.cursorColor = Colors.green,
this.focusBorderColor = Colors.green,
this.focusNode,
this.textInputType = TextInputType.text,
this.decoration,
this.dense = true,
this.icon,
this.image,
this.suffixIcon,
this.prefixIcon,
this.onChanged,
this.validator,
this.onSaved,
this.onFieldSubmitted,
this.inputFormatter,
this.onEditingComplete,
this.onTap,
this.obscuringCharacter = '•',
this.filled = true,
this.fillColor = Colors.white,
this.isBorder = true,
this.isPrefix = false,
this.prefixText,
this.suffixText = '',
this.suffixIconConstraints,
this.borderRadius = const BorderRadius.all(Radius.circular(10.0)),
this.borderType = InputBorderType.outline,
this.prefixStyle,
this.suffixStyle,
this.errorText,
});