TextField constructor

const TextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? label,
  4. String? hint,
  5. IconData? icon,
  6. String? prefixText,
  7. Widget? suffixIcon,
  8. String? errorText,
  9. TextInputType? keyboardType,
  10. TextInputAction? textInputAction,
  11. bool obscureText = false,
  12. String obscuringCharacter = '•',
  13. bool enabled = true,
  14. bool readOnly = false,
  15. int maxLines = 1,
  16. int? minLines,
  17. int? maxLength,
  18. String? validator(
    1. String?
    )?,
  19. ValueChanged<String>? onChanged,
  20. ValueChanged<String>? onSubmitted,
  21. VoidCallback? onTap,
  22. FocusNode? focusNode,
  23. String? initialValue,
  24. bool autofocus = false,
  25. Iterable<String>? autofillHints,
  26. List<TextInputFormatter>? inputFormatters,
  27. TextCapitalization capitalization = TextCapitalization.none,
  28. AutovalidateMode? autovalidateMode,
  29. bool filled = true,
  30. Color? focusBorderColor,
  31. double borderRadius = AppRadius.medium,
  32. ValueChanged<String?>? onFieldSaved,
  33. TextAlign textAlign = TextAlign.start,
  34. Color? cursorColor,
  35. TextStyle? textStyle,
  36. InputDecoration? decoration,
})

Implementation

const TextField({
  super.key,
  this.controller,
  this.label,
  this.hint,
  this.icon,
  this.prefixText,
  this.suffixIcon,
  this.errorText,
  this.keyboardType,
  this.textInputAction,
  this.obscureText = false,
  this.obscuringCharacter = '•',
  this.enabled = true,
  this.readOnly = false,
  this.maxLines = 1,
  this.minLines,
  this.maxLength,
  this.validator,
  this.onChanged,
  this.onSubmitted,
  this.onTap,
  this.focusNode,
  this.initialValue,
  this.autofocus = false,
  this.autofillHints,
  this.inputFormatters,
  this.capitalization = TextCapitalization.none,
  this.autovalidateMode,
  this.filled = true,
  this.focusBorderColor,
  this.borderRadius = AppRadius.medium,
  this.onFieldSaved,
  this.textAlign = TextAlign.start,
  this.cursorColor,
  this.textStyle,
  this.decoration,
});