TextField constructor

const TextField({
  1. Key? key,
  2. String? label,
  3. TextStyle? labelStyle,
  4. String? hintText,
  5. FocusNode? focusNode,
  6. String? errorText,
  7. bool enabled = true,
  8. bool readOnly = false,
  9. Widget? suffix,
  10. Widget? suffixIcon,
  11. Widget? prefix,
  12. Widget? prefixIcon,
  13. bool obscureText = false,
  14. bool? filled,
  15. BorderRadius? borderRadius,
  16. TextEditingController? controller,
  17. List<InputFeedbackText>? feedback,
  18. TextInputType? keyboardType,
  19. List<TextInputFormatter>? inputFormatters,
  20. TextCapitalization textCapitalization = material.TextCapitalization.none,
  21. TextAlign textAlign = material.TextAlign.start,
  22. TextInputAction? textInputAction,
  23. int? maxLength,
  24. int? maxLines = 1,
  25. int? minLines,
  26. bool? expands,
  27. TextStyle? textStyle,
  28. void onChanged(
    1. String value
    )?,
  29. InputDecoration? decoration,
  30. bool overrideDecoration = false,
  31. TextAlignVertical? textAlignVertical,
  32. WrapWidgetBuilder? innerBoxWrapper,
  33. ValueChanged<String>? onSubmitted,
  34. EdgeInsets scrollPadding = const EdgeInsets.all(10),
  35. bool? autocorrect,
  36. double? cursorHeight,
  37. bool forceErrorStyle = false,
  38. Iterable<String>? autofillHints = const [],
})

Implementation

const TextField({
  Key? key,
  this.label,
  this.labelStyle,
  this.hintText,
  this.focusNode,
  this.errorText,
  this.enabled = true,
  this.readOnly = false,
  this.suffix,
  this.suffixIcon,
  this.prefix,
  this.prefixIcon,
  this.obscureText = false,
  this.filled,
  this.borderRadius,
  this.controller,
  this.feedback,
  this.keyboardType,
  this.inputFormatters,
  this.textCapitalization = material.TextCapitalization.none,
  this.textAlign = material.TextAlign.start,
  this.textInputAction,
  this.maxLength,
  this.maxLines = 1,
  this.minLines,
  this.expands,
  this.textStyle,
  this.onChanged,
  this.decoration,
  this.overrideDecoration = false,
  this.textAlignVertical,
  this.innerBoxWrapper,
  this.onSubmitted,
  this.scrollPadding = const EdgeInsets.all(10),
  this.autocorrect,
  this.cursorHeight,
  this.forceErrorStyle = false,
  this.autofillHints = const [],
}) : super(key: key);