TextField.filled constructor

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

Convenient factory creating a filled TextField.

Implementation

factory TextField.filled({
  Key? key,
  String? label,
  Widget? labelWidget,
  bool appendColonToLabel = true,
  material.TextStyle? labelStyle,
  String? hintText,
  FocusNode? focusNode,
  String? errorText,
  bool enabled = true,
  bool readOnly = false,
  Widget? suffix,
  Widget? suffixIcon,
  Widget? prefix,
  Widget? prefixIcon,
  bool obscureText = false,
  Color? fillColor,
  BorderRadius? borderRadius,
  material.TextEditingController? controller,
  List<InputFeedbackText>? feedback,
  material.TextInputType? keyboardType,
  List<TextInputFormatter>? inputFormatters,
  material.TextCapitalization textCapitalization =
      material.TextCapitalization.none,
  material.TextAlign textAlign = material.TextAlign.start,
  material.TextInputAction? textInputAction,
  int? maxLength,
  int? maxLines = 1,
  int? minLines,
  bool? expands,
  material.TextStyle? textStyle,
  ValueChanged<String>? onChanged,
  ValueChanged<String>? onSubmitted,
  material.InputDecoration? decoration,
  bool overrideDecoration = false,
  TextAlignVertical? textAlignVertical,
  WrapWidgetBuilder? innerBoxWrapper,
  bool forceErrorStyle = false,
  bool autofocus = false,
  bool enableSuggestions = true,
  Iterable<String>? autofillHints,
}) {
  return TextField(
    key: key,
    label: label,
    labelWidget: labelWidget,
    appendColonToLabel: appendColonToLabel,
    labelStyle: labelStyle,
    hintText: hintText,
    focusNode: focusNode,
    errorText: errorText,
    enabled: enabled,
    readOnly: readOnly,
    suffix: suffix,
    suffixIcon: suffixIcon,
    prefix: prefix,
    prefixIcon: prefixIcon,
    obscureText: obscureText,
    filled: true,
    fillColor: fillColor,
    borderRadius: borderRadius,
    controller: controller,
    feedback: feedback,
    keyboardType: keyboardType,
    inputFormatters: inputFormatters,
    textCapitalization: textCapitalization,
    textAlign: textAlign,
    textInputAction: textInputAction,
    maxLength: maxLength,
    maxLines: maxLines,
    minLines: minLines,
    expands: expands,
    textStyle: textStyle,
    onChanged: onChanged,
    onSubmitted: onSubmitted,
    decoration: decoration,
    overrideDecoration: overrideDecoration,
    textAlignVertical: textAlignVertical,
    innerBoxWrapper: innerBoxWrapper,
    forceErrorStyle: forceErrorStyle,
    autofocus: autofocus,
    enableSuggestions: enableSuggestions,
    autofillHints: autofillHints,
  );
}