copyWith method

InputDecorationTheme copyWith (
  1. {TextStyle labelStyle,
  2. TextStyle helperStyle,
  3. int helperMaxLines,
  4. TextStyle hintStyle,
  5. TextStyle errorStyle,
  6. int errorMaxLines,
  7. @Deprecated('Use floatingLabelBehaviour instead. ' 'This feature was deprecated after v1.13.2.') bool hasFloatingPlaceholder,
  8. FloatingLabelBehavior floatingLabelBehavior,
  9. bool isDense,
  10. EdgeInsetsGeometry contentPadding,
  11. bool isCollapsed,
  12. TextStyle prefixStyle,
  13. TextStyle suffixStyle,
  14. TextStyle counterStyle,
  15. bool filled,
  16. Color fillColor,
  17. Color focusColor,
  18. Color hoverColor,
  19. InputBorder errorBorder,
  20. InputBorder focusedBorder,
  21. InputBorder focusedErrorBorder,
  22. InputBorder disabledBorder,
  23. InputBorder enabledBorder,
  24. InputBorder border,
  25. bool alignLabelWithHint}
)

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

Implementation

InputDecorationTheme copyWith({
  TextStyle labelStyle,
  TextStyle helperStyle,
  int helperMaxLines,
  TextStyle hintStyle,
  TextStyle errorStyle,
  int errorMaxLines,
  @Deprecated(
    'Use floatingLabelBehaviour instead. '
    'This feature was deprecated after v1.13.2.'
  )
  bool hasFloatingPlaceholder,
  FloatingLabelBehavior floatingLabelBehavior,
  bool isDense,
  EdgeInsetsGeometry contentPadding,
  bool isCollapsed,
  TextStyle prefixStyle,
  TextStyle suffixStyle,
  TextStyle counterStyle,
  bool filled,
  Color fillColor,
  Color focusColor,
  Color hoverColor,
  InputBorder errorBorder,
  InputBorder focusedBorder,
  InputBorder focusedErrorBorder,
  InputBorder disabledBorder,
  InputBorder enabledBorder,
  InputBorder border,
  bool alignLabelWithHint,
}) {
  return InputDecorationTheme(
    labelStyle: labelStyle ?? this.labelStyle,
    helperStyle: helperStyle ?? this.helperStyle,
    helperMaxLines: helperMaxLines ?? this.helperMaxLines,
    hintStyle: hintStyle ?? this.hintStyle,
    errorStyle: errorStyle ?? this.errorStyle,
    errorMaxLines: errorMaxLines ?? this.errorMaxLines,
    // ignore: deprecated_member_use_from_same_package
    hasFloatingPlaceholder: hasFloatingPlaceholder ?? this.hasFloatingPlaceholder,
    floatingLabelBehavior: floatingLabelBehavior ?? this.floatingLabelBehavior,
    isDense: isDense ?? this.isDense,
    contentPadding: contentPadding ?? this.contentPadding,
    isCollapsed: isCollapsed ?? this.isCollapsed,
    prefixStyle: prefixStyle ?? this.prefixStyle,
    suffixStyle: suffixStyle ?? this.suffixStyle,
    counterStyle: counterStyle ?? this.counterStyle,
    filled: filled ?? this.filled,
    fillColor: fillColor ?? this.fillColor,
    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,
  );
}