TextField constructor

const TextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? hintText,
  4. String? labelText,
  5. TextStyle? hintStyle,
  6. TextStyle? labelStyle,
  7. TextInputType? keyboardType,
  8. TextCapitalization textCapitalization = TextCapitalization.none,
  9. bool obscureText = false,
  10. int? maxLines = 1,
  11. int? minLines,
  12. InputDecoration? decoration,
  13. TextInputAction? textInputAction,
  14. ValueChanged<String>? onChanged,
  15. ValueChanged<String>? onSubmitted,
  16. bool enabled = true,
  17. Widget? prefixIcon,
  18. Widget? suffixIcon,
  19. TextAlignVertical? textAlignVertical,
  20. bool expands = false,
  21. FocusNode? focusNode,
  22. bool autofocus = false,
})

Implementation

const TextField({
  super.key,
  this.controller,
  this.hintText,
  this.labelText,
  this.hintStyle,
  this.labelStyle,
  this.keyboardType,
  this.textCapitalization = TextCapitalization.none,
  this.obscureText = false,
  this.maxLines = 1,
  this.minLines,
  this.decoration,
  this.textInputAction,
  this.onChanged,
  this.onSubmitted,
  this.enabled = true,
  this.prefixIcon,
  this.suffixIcon,
  this.textAlignVertical,
  this.expands = false,
  this.focusNode,
  this.autofocus = false,
});