copyWith method

InputDecoration copyWith({
  1. String? labelText,
  2. TextStyle? labelStyle,
  3. String? helperText,
  4. TextStyle? helperStyle,
  5. String? placeholderText,
  6. Color? placeholderColor,
  7. BorderData? border,
  8. Color? hoverBorderColor,
  9. Color? focusBorderColor,
  10. TextStyle? errorStyle,
  11. TextStyle? inputStyle,
  12. EdgeInsets? padding,
  13. 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,
  );
}