copyWith method

InputDecorationTheme copyWith({
  1. TextStyle? labelStyle,
  2. TextStyle? floatingLabelStyle,
  3. TextStyle? helperStyle,
  4. int? helperMaxLines,
  5. TextStyle? hintStyle,
  6. Duration? hintFadeDuration,
  7. int? hintMaxLines,
  8. TextStyle? errorStyle,
  9. int? errorMaxLines,
  10. FloatingLabelBehavior? floatingLabelBehavior,
  11. FloatingLabelAlignment? floatingLabelAlignment,
  12. bool? isDense,
  13. EdgeInsetsGeometry? contentPadding,
  14. bool? isCollapsed,
  15. Color? iconColor,
  16. TextStyle? prefixStyle,
  17. Color? prefixIconColor,
  18. BoxConstraints? prefixIconConstraints,
  19. TextStyle? suffixStyle,
  20. Color? suffixIconColor,
  21. BoxConstraints? suffixIconConstraints,
  22. TextStyle? counterStyle,
  23. bool? filled,
  24. Color? fillColor,
  25. BorderSide? activeIndicatorBorder,
  26. BorderSide? outlineBorder,
  27. Color? focusColor,
  28. Color? hoverColor,
  29. InputBorder? errorBorder,
  30. InputBorder? focusedBorder,
  31. InputBorder? focusedErrorBorder,
  32. InputBorder? disabledBorder,
  33. InputBorder? enabledBorder,
  34. InputBorder? border,
  35. bool? alignLabelWithHint,
  36. BoxConstraints? constraints,
  37. VisualDensity? visualDensity,
})

Creates a copy of this object but with the given fields replaced with the new values.

This method is obsolete and will be deprecated in a future release: please use the InputDecorationThemeData.copyWith instead.

Implementation

InputDecorationTheme copyWith({
  TextStyle? labelStyle,
  TextStyle? floatingLabelStyle,
  TextStyle? helperStyle,
  int? helperMaxLines,
  TextStyle? hintStyle,
  Duration? hintFadeDuration,
  int? hintMaxLines,
  TextStyle? errorStyle,
  int? errorMaxLines,
  FloatingLabelBehavior? floatingLabelBehavior,
  FloatingLabelAlignment? floatingLabelAlignment,
  bool? isDense,
  EdgeInsetsGeometry? contentPadding,
  bool? isCollapsed,
  Color? iconColor,
  TextStyle? prefixStyle,
  Color? prefixIconColor,
  BoxConstraints? prefixIconConstraints,
  TextStyle? suffixStyle,
  Color? suffixIconColor,
  BoxConstraints? suffixIconConstraints,
  TextStyle? counterStyle,
  bool? filled,
  Color? fillColor,
  BorderSide? activeIndicatorBorder,
  BorderSide? outlineBorder,
  Color? focusColor,
  Color? hoverColor,
  InputBorder? errorBorder,
  InputBorder? focusedBorder,
  InputBorder? focusedErrorBorder,
  InputBorder? disabledBorder,
  InputBorder? enabledBorder,
  InputBorder? border,
  bool? alignLabelWithHint,
  BoxConstraints? constraints,
  VisualDensity? visualDensity,
}) {
  return InputDecorationTheme(
    labelStyle: labelStyle ?? this.labelStyle,
    floatingLabelStyle: floatingLabelStyle ?? this.floatingLabelStyle,
    helperStyle: helperStyle ?? this.helperStyle,
    helperMaxLines: helperMaxLines ?? this.helperMaxLines,
    hintStyle: hintStyle ?? this.hintStyle,
    hintFadeDuration: hintFadeDuration ?? this.hintFadeDuration,
    hintMaxLines: hintMaxLines ?? this.hintMaxLines,
    errorStyle: errorStyle ?? this.errorStyle,
    errorMaxLines: errorMaxLines ?? this.errorMaxLines,
    floatingLabelBehavior: floatingLabelBehavior ?? this.floatingLabelBehavior,
    floatingLabelAlignment: floatingLabelAlignment ?? this.floatingLabelAlignment,
    isDense: isDense ?? this.isDense,
    contentPadding: contentPadding ?? this.contentPadding,
    iconColor: iconColor ?? this.iconColor,
    isCollapsed: isCollapsed ?? this.isCollapsed,
    prefixStyle: prefixStyle ?? this.prefixStyle,
    prefixIconColor: prefixIconColor ?? this.prefixIconColor,
    prefixIconConstraints: prefixIconConstraints ?? this.prefixIconConstraints,
    suffixStyle: suffixStyle ?? this.suffixStyle,
    suffixIconColor: suffixIconColor ?? this.suffixIconColor,
    suffixIconConstraints: suffixIconConstraints ?? this.suffixIconConstraints,
    counterStyle: counterStyle ?? this.counterStyle,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
    activeIndicatorBorder: activeIndicatorBorder ?? this.activeIndicatorBorder,
    outlineBorder: outlineBorder ?? this.outlineBorder,
    focusColor: focusColor ?? this.focusColor,
    hoverColor: hoverColor ?? this.hoverColor,
    errorBorder: errorBorder ?? this.errorBorder,
    focusedBorder: focusedBorder ?? this.focusedBorder,
    focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder,
    disabledBorder: disabledBorder ?? this.disabledBorder,
    enabledBorder: enabledBorder ?? this.enabledBorder,
    border: border ?? this.border,
    alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint,
    constraints: constraints ?? this.constraints,
    visualDensity: visualDensity ?? this.visualDensity,
  );
}