copyWith method
InputDecoration
copyWith({
- Widget? hint,
- String? hintText,
- TextStyle? hintStyle,
- int? hintMaxLines,
- String? helperText,
- Widget? error,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- Widget? counter,
- String? counterText,
- TextStyle? counterStyle,
- Widget? prefix,
- String? prefixText,
- TextStyle? prefixStyle,
- Widget? suffix,
- String? suffixText,
- TextStyle? suffixStyle,
- Widget? prefixIcon,
- Widget? suffixIcon,
- BoxConstraints? prefixIconConstraints,
- BoxConstraints? suffixIconConstraints,
- BoxConstraints? constraints,
- EdgeInsetsGeometry? contentPadding,
- bool? isDense,
- bool? isCollapsed,
- bool? filled,
- Color? fillColor,
- Color? hoverColor,
- InputBorder? border,
- InputBorder? enabledBorder,
- InputBorder? disabledBorder,
- InputBorder? focusedBorder,
- InputBorder? errorBorder,
- InputBorder? focusedErrorBorder,
- bool? enabled,
Implementation
InputDecoration copyWith({
Widget? hint,
String? hintText,
TextStyle? hintStyle,
int? hintMaxLines,
String? helperText,
Widget? error,
String? errorText,
TextStyle? errorStyle,
int? errorMaxLines,
Widget? counter,
String? counterText,
TextStyle? counterStyle,
Widget? prefix,
String? prefixText,
TextStyle? prefixStyle,
Widget? suffix,
String? suffixText,
TextStyle? suffixStyle,
Widget? prefixIcon,
Widget? suffixIcon,
BoxConstraints? prefixIconConstraints,
BoxConstraints? suffixIconConstraints,
BoxConstraints? constraints,
EdgeInsetsGeometry? contentPadding,
bool? isDense,
bool? isCollapsed,
bool? filled,
Color? fillColor,
Color? hoverColor,
InputBorder? border,
InputBorder? enabledBorder,
InputBorder? disabledBorder,
InputBorder? focusedBorder,
InputBorder? errorBorder,
InputBorder? focusedErrorBorder,
bool? enabled,
}) {
return InputDecoration(
hint: hint ?? this.hint,
hintText: hintText ?? this.hintText,
hintStyle: hintStyle ?? this.hintStyle,
hintMaxLines: hintMaxLines ?? this.hintMaxLines,
helperText: helperText ?? this.helperText,
error: error ?? this.error,
errorText: errorText ?? this.errorText,
errorStyle: errorStyle ?? this.errorStyle,
errorMaxLines: errorMaxLines ?? this.errorMaxLines,
counter: counter ?? this.counter,
counterText: counterText ?? this.counterText,
counterStyle: counterStyle ?? this.counterStyle,
prefix: prefix ?? this.prefix,
prefixText: prefixText ?? this.prefixText,
prefixStyle: prefixStyle ?? this.prefixStyle,
suffix: suffix ?? this.suffix,
suffixText: suffixText ?? this.suffixText,
suffixStyle: suffixStyle ?? this.suffixStyle,
prefixIcon: prefixIcon ?? this.prefixIcon,
suffixIcon: suffixIcon ?? this.suffixIcon,
prefixIconConstraints:
prefixIconConstraints ?? this.prefixIconConstraints,
suffixIconConstraints:
suffixIconConstraints ?? this.suffixIconConstraints,
constraints: constraints ?? this.constraints,
contentPadding: contentPadding ?? this.contentPadding,
isDense: isDense ?? this.isDense,
isCollapsed: isCollapsed ?? this.isCollapsed,
filled: filled ?? this.filled,
fillColor: fillColor ?? this.fillColor,
hoverColor: hoverColor ?? this.hoverColor,
border: border ?? this.border,
enabledBorder: enabledBorder ?? this.enabledBorder,
disabledBorder: disabledBorder ?? this.disabledBorder,
focusedBorder: focusedBorder ?? this.focusedBorder,
errorBorder: errorBorder ?? this.errorBorder,
focusedErrorBorder: focusedErrorBorder ?? this.focusedErrorBorder,
enabled: enabled ?? this.enabled,
);
}