copyWith method
ErrorlessInputDecoration
copyWith({
- Widget? icon,
- Widget? label,
- String? labelText,
- String? helperText,
- Widget? helper,
- int? helperMaxLines,
- TextStyle? helperStyle,
- String? hintText,
- Widget? hint,
- Widget? error,
- String? errorText,
- TextStyle? errorStyle,
- int? errorMaxLines,
- bool? isDense,
- EdgeInsetsGeometry? contentPadding,
- Widget? prefixIcon,
- Widget? prefix,
- String? prefixText,
- TextStyle? prefixStyle,
- Widget? suffixIcon,
- Widget? suffix,
- String? suffixText,
- TextStyle? suffixStyle,
- Widget? counter,
- String? counterText,
- TextStyle? counterStyle,
- bool? filled,
- Color? fillColor,
- Color? focusColor,
- Color? hoverColor,
- InputBorder? errorBorder,
- InputBorder? focusedBorder,
- InputBorder? focusedErrorBorder,
- InputBorder? disabledBorder,
- InputBorder? enabledBorder,
- InputBorder? border,
- bool? enabled,
- String? semanticCounterText,
- SemanticsService? semanticsService,
- bool? alignLabelWithHint,
- BoxConstraints? constraints,
- FloatingLabelAlignment? floatingLabelAlignment,
- FloatingLabelBehavior? floatingLabelBehavior,
- TextStyle? floatingLabelStyle,
- Color? iconColor,
- Duration? hintFadeDuration,
- int? hintMaxLines,
- TextStyle? hintStyle,
- TextDirection? hintTextDirection,
- bool? isCollapsed,
- TextStyle? labelStyle,
- bool? maintainHintHeight,
- bool? maintainHintSize,
- Color? prefixIconColor,
- BoxConstraints? prefixIconConstraints,
- Color? suffixIconColor,
- BoxConstraints? suffixIconConstraints,
- VisualDensity? visualDensity,
override
Creates a copy of this input decoration with the given fields replaced by the new values.
Implementation
@override
ErrorlessInputDecoration copyWith({
Widget? icon,
Widget? label,
String? labelText,
String? helperText,
Widget? helper,
int? helperMaxLines,
TextStyle? helperStyle,
String? hintText,
Widget? hint,
Widget? error,
String? errorText,
TextStyle? errorStyle,
int? errorMaxLines,
bool? isDense,
EdgeInsetsGeometry? contentPadding,
Widget? prefixIcon,
Widget? prefix,
String? prefixText,
TextStyle? prefixStyle,
Widget? suffixIcon,
Widget? suffix,
String? suffixText,
TextStyle? suffixStyle,
Widget? counter,
String? counterText,
TextStyle? counterStyle,
bool? filled,
Color? fillColor,
Color? focusColor,
Color? hoverColor,
InputBorder? errorBorder,
InputBorder? focusedBorder,
InputBorder? focusedErrorBorder,
InputBorder? disabledBorder,
InputBorder? enabledBorder,
InputBorder? border,
bool? enabled,
String? semanticCounterText,
SemanticsService? semanticsService,
bool? alignLabelWithHint,
BoxConstraints? constraints,
FloatingLabelAlignment? floatingLabelAlignment,
FloatingLabelBehavior? floatingLabelBehavior,
TextStyle? floatingLabelStyle,
Color? iconColor,
Duration? hintFadeDuration,
int? hintMaxLines,
TextStyle? hintStyle,
TextDirection? hintTextDirection,
bool? isCollapsed,
TextStyle? labelStyle,
bool? maintainHintHeight,
bool? maintainHintSize,
Color? prefixIconColor,
BoxConstraints? prefixIconConstraints,
Color? suffixIconColor,
BoxConstraints? suffixIconConstraints,
VisualDensity? visualDensity,
}) {
return ErrorlessInputDecoration(
icon: icon ?? this.icon,
label: label ?? this.label,
labelText: labelText ?? this.labelText,
helperText: helperText ?? this.helperText,
hintText: hintText ?? this.hintText,
errorText: null, //errorText ?? this.errorText,
errorStyle: errorStyle ?? this.errorStyle,
errorMaxLines: errorMaxLines ?? this.errorMaxLines,
isDense: isDense ?? this.isDense,
contentPadding: contentPadding ?? this.contentPadding,
prefixIcon: prefixIcon ?? this.prefixIcon,
prefix: prefix ?? this.prefix,
prefixText: prefixText ?? this.prefixText,
prefixStyle: prefixStyle ?? this.prefixStyle,
suffixIcon: suffixIcon ?? this.suffixIcon,
suffix: suffix ?? this.suffix,
suffixText: suffixText ?? this.suffixText,
suffixStyle: suffixStyle ?? this.suffixStyle,
counter: counter ?? this.counter,
counterText: counterText ?? this.counterText,
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,
enabled: enabled ?? this.enabled,
semanticCounterText: semanticCounterText ?? this.semanticCounterText,
alignLabelWithHint: alignLabelWithHint ?? this.alignLabelWithHint,
constraints: constraints ?? this.constraints,
floatingLabelAlignment: floatingLabelAlignment ?? this.floatingLabelAlignment,
floatingLabelBehavior: floatingLabelBehavior ?? this.floatingLabelBehavior,
floatingLabelStyle: floatingLabelStyle ?? this.floatingLabelStyle,
iconColor: iconColor ?? this.iconColor,
hintFadeDuration: hintFadeDuration ?? this.hintFadeDuration,
hintMaxLines: hintMaxLines ?? this.hintMaxLines,
hintStyle: hintStyle ?? this.hintStyle,
hintTextDirection: hintTextDirection ?? this.hintTextDirection,
isCollapsed: isCollapsed ?? this.isCollapsed,
labelStyle: labelStyle ?? this.labelStyle,
prefixIconColor: prefixIconColor ?? this.prefixIconColor,
prefixIconConstraints: prefixIconConstraints ?? this.prefixIconConstraints,
suffixIconColor: suffixIconColor ?? this.suffixIconColor,
suffixIconConstraints: suffixIconConstraints ?? this.suffixIconConstraints,
visualDensity: visualDensity ?? this.visualDensity,
);
}