copyWith method
InputDecoration
copyWith({
- String? labelText,
- TextStyle? labelStyle,
- String? helperText,
- TextStyle? helperStyle,
- String? placeholderText,
- Color? placeholderColor,
- BorderData? border,
- Color? hoverBorderColor,
- Color? focusBorderColor,
- TextStyle? errorStyle,
- TextStyle? inputStyle,
- EdgeInsets? padding,
- EdgeInsets? margin,
Implementation
InputDecoration copyWith({
String? labelText,
TextStyle? labelStyle,
String? helperText,
TextStyle? helperStyle,
String? placeholderText,
Color? placeholderColor,
BorderData? border,
Color? hoverBorderColor,
Color? focusBorderColor,
TextStyle? errorStyle,
TextStyle? inputStyle,
EdgeInsets? padding,
EdgeInsets? margin,
}) {
return InputDecoration(
labelText: labelText ?? this.labelText,
labelStyle: labelStyle ?? this.labelStyle,
helperText: helperText ?? this.helperText,
helperStyle: helperStyle ?? this.helperStyle,
placeholderText: placeholderText ?? this.placeholderText,
placeholderColor: placeholderColor ?? this.placeholderColor,
border: border ?? this.border,
hoverBorderColor: hoverBorderColor ?? this.hoverBorderColor,
focusBorderColor: focusBorderColor ?? this.focusBorderColor,
errorStyle: errorStyle ?? this.errorStyle,
inputStyle: inputStyle ?? this.inputStyle,
padding: padding ?? this.padding,
margin: margin ?? this.margin,
);
}