TextFormFields constructor

const TextFormFields({
  1. Key? key,
  2. String? hintText,
  3. TextAlign textAlign = TextAlign.start,
  4. bool enabled = true,
  5. bool readOnly = false,
  6. TextEditingController? textEditingController,
  7. EdgeInsetsGeometry contentPadding = const EdgeInsets.all(16),
  8. bool autoFocus = false,
  9. int maxLines = 1,
  10. int minLines = 1,
  11. bool obscureText = false,
  12. TextInputAction textInputAction = TextInputAction.next,
  13. String label = '',
  14. TextStyle? labelStyle,
  15. TextStyle? fieldStyle,
  16. TextStyle? hintStyle,
  17. TextStyle? errorStyle,
  18. Color borderColor = Colors.grey,
  19. Color focusColor = Colors.green,
  20. Color cursorColor = Colors.green,
  21. Color focusBorderColor = Colors.green,
  22. FocusNode? focusNode,
  23. TextInputType textInputType = TextInputType.text,
  24. InputDecoration? decoration,
  25. bool dense = true,
  26. Widget? icon,
  27. Widget? image,
  28. Widget? suffixIcon,
  29. Widget? prefixIcon,
  30. dynamic onChanged(
    1. String s
    )?,
  31. String? validator(
    1. String? s
    )?,
  32. dynamic onSaved(
    1. String? s
    )?,
  33. dynamic onFieldSubmitted(
    1. String s
    )?,
  34. List<TextInputFormatter>? inputFormatter,
  35. dynamic onEditingComplete()?,
  36. dynamic onTap()?,
  37. String obscuringCharacter = '•',
  38. bool filled = true,
  39. Color fillColor = Colors.white,
  40. bool isBorder = true,
  41. bool isPrefix = false,
  42. String? prefixText,
  43. String suffixText = '',
  44. BoxConstraints? suffixIconConstraints,
  45. BorderRadius borderRadius = const BorderRadius.all(Radius.circular(10.0)),
  46. InputBorderType? borderType = InputBorderType.outline,
  47. TextStyle? prefixStyle,
  48. TextStyle? suffixStyle,
  49. 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,
});