copyWith method

  1. @override
SimpleInputDecoration copyWith({
  1. Widget? icon,
  2. Color? iconColor,
  3. Widget? label,
  4. String? labelText,
  5. TextStyle? labelStyle,
  6. TextStyle? floatingLabelStyle,
  7. Widget? helper,
  8. String? helperText,
  9. TextStyle? helperStyle,
  10. int? helperMaxLines,
  11. String? hintText,
  12. TextStyle? hintStyle,
  13. TextDirection? hintTextDirection,
  14. int? hintMaxLines,
  15. Duration? hintFadeDuration,
  16. Widget? error,
  17. String? errorText,
  18. TextStyle? errorStyle,
  19. int? errorMaxLines,
  20. FloatingLabelBehavior? floatingLabelBehavior,
  21. FloatingLabelAlignment? floatingLabelAlignment,
  22. bool? isCollapsed,
  23. bool? isDense,
  24. EdgeInsetsGeometry? contentPadding,
  25. Widget? prefixIcon,
  26. Widget? prefix,
  27. String? prefixText,
  28. TextStyle? prefixStyle,
  29. Color? prefixIconColor,
  30. BoxConstraints? prefixIconConstraints,
  31. Widget? suffixIcon,
  32. Widget? suffix,
  33. String? suffixText,
  34. TextStyle? suffixStyle,
  35. Color? suffixIconColor,
  36. BoxConstraints? suffixIconConstraints,
  37. Widget? counter,
  38. String? counterText,
  39. TextStyle? counterStyle,
  40. bool? filled,
  41. Color? fillColor,
  42. Color? focusColor,
  43. Color? hoverColor,
  44. SimpleInputBorder? simpleBorder,
  45. InputBorder? border,
  46. InputBorder? errorBorder,
  47. InputBorder? focusedBorder,
  48. InputBorder? focusedErrorBorder,
  49. InputBorder? enabledBorder,
  50. InputBorder? disabledBorder,
  51. bool? enabled,
  52. String? semanticCounterText,
  53. bool? alignLabelWithHint,
  54. BoxConstraints? constraints,
})
override

Creates a copy of this input decoration with the given fields replaced by the new values.

Implementation

@override
SimpleInputDecoration copyWith({
  Widget? icon,
  Color? iconColor,
  Widget? label,
  String? labelText,
  TextStyle? labelStyle,
  TextStyle? floatingLabelStyle,
  Widget? helper,
  String? helperText,
  TextStyle? helperStyle,
  int? helperMaxLines,
  String? hintText,
  TextStyle? hintStyle,
  TextDirection? hintTextDirection,
  int? hintMaxLines,
  Duration? hintFadeDuration,
  Widget? error,
  String? errorText,
  TextStyle? errorStyle,
  int? errorMaxLines,
  FloatingLabelBehavior? floatingLabelBehavior,
  FloatingLabelAlignment? floatingLabelAlignment,
  bool? isCollapsed,
  bool? isDense,
  EdgeInsetsGeometry? contentPadding,
  Widget? prefixIcon,
  Widget? prefix,
  String? prefixText,
  TextStyle? prefixStyle,
  Color? prefixIconColor,
  BoxConstraints? prefixIconConstraints,
  Widget? suffixIcon,
  Widget? suffix,
  String? suffixText,
  TextStyle? suffixStyle,
  Color? suffixIconColor,
  BoxConstraints? suffixIconConstraints,
  Widget? counter,
  String? counterText,
  TextStyle? counterStyle,
  bool? filled,
  Color? fillColor,
  Color? focusColor,
  Color? hoverColor,
  SimpleInputBorder? simpleBorder,
  InputBorder? border,
  InputBorder? errorBorder,
  InputBorder? focusedBorder,
  InputBorder? focusedErrorBorder,
  InputBorder? enabledBorder,
  InputBorder? disabledBorder,
  bool? enabled,
  String? semanticCounterText,
  bool? alignLabelWithHint,
  BoxConstraints? constraints,
}) =>
    SimpleInputDecoration(
      icon: icon ?? this.icon,
      iconColor: iconColor ?? this.iconColor,
      label: label ?? this.label,
      labelText: labelText ?? this.labelText,
      labelStyle: labelStyle ?? this.labelStyle,
      floatingLabelStyle: floatingLabelStyle ?? this.floatingLabelStyle,
      helper: helper ?? this.helper,
      helperText: helperText ?? this.helperText,
      helperStyle: helperStyle ?? this.helperStyle,
      helperMaxLines: helperMaxLines ?? this.helperMaxLines,
      hintText: hintText ?? this.hintText,
      hintStyle: hintStyle ?? this.hintStyle,
      hintTextDirection: hintTextDirection ?? this.hintTextDirection,
      hintMaxLines: hintMaxLines ?? this.hintMaxLines,
      hintFadeDuration: hintFadeDuration ?? this.hintFadeDuration,
      error: error ?? this.error,
      errorText: errorText ?? this.errorText,
      errorStyle: errorStyle ?? this.errorStyle,
      errorMaxLines: errorMaxLines ?? this.errorMaxLines,
      floatingLabelBehavior:
          floatingLabelBehavior ?? this.floatingLabelBehavior,
      floatingLabelAlignment:
          floatingLabelAlignment ?? this.floatingLabelAlignment,
      isCollapsed: isCollapsed ?? this.isCollapsed,
      isDense: isDense ?? this.isDense,
      contentPadding: contentPadding ?? this.contentPadding,
      prefixIcon: prefixIcon ?? this.prefixIcon,
      prefix: prefix ?? this.prefix,
      prefixText: prefixText ?? this.prefixText,
      prefixStyle: prefixStyle ?? this.prefixStyle,
      prefixIconColor: prefixIconColor ?? this.prefixIconColor,
      prefixIconConstraints:
          prefixIconConstraints ?? this.prefixIconConstraints,
      suffixIcon: suffixIcon ?? this.suffixIcon,
      suffix: suffix ?? this.suffix,
      suffixText: suffixText ?? this.suffixText,
      suffixStyle: suffixStyle ?? this.suffixStyle,
      suffixIconColor: suffixIconColor ?? this.suffixIconColor,
      suffixIconConstraints:
          suffixIconConstraints ?? this.suffixIconConstraints,
      counter: counter ?? this.counter,
      counterText: counterText ?? this.counterText,
      counterStyle: counterStyle ?? this.counterStyle,
      filled: filled ?? this.filled,
      fillColor: fillColor ?? this.fillColor,
      focusColor: focusColor ?? this.focusColor,
      hoverColor: hoverColor ?? this.hoverColor,
      simpleBorder: simpleBorder ?? this.simpleBorder,
      border: border ?? this.border,
      errorBorder: errorBorder ?? this.errorBorder,
      focusedBorder: focusedBorder ?? this.focusedBorder,
      focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder,
      enabledBorder: enabledBorder ?? this.enabledBorder,
      disabledBorder: disabledBorder ?? this.disabledBorder,
      enabled: enabled ?? this.enabled,
      semanticCounterText: semanticCounterText ?? this.semanticCounterText,
      alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint,
      constraints: constraints ?? this.constraints,
    );