copyWith method
CustomDropdownConfig
copyWith({
- double? height,
- double? radius,
- EdgeInsets? padding,
- Color? borderColor,
- Color? dropdownColor,
- Color? disabledColor,
- Color? errorBorderColor,
- bool? showDivider,
- bool? enableSearch,
- String? searchHint,
- String? noResultsText,
- double? elevation,
- double? borderWidth,
- double? focusedBorderWidth,
- double? errorBorderWidth,
- Color? searchIconColor,
- Color? selectedItemColor,
- TextStyle? itemTextStyle,
- TextStyle? selectedTextStyle,
- Color? shadowColor,
- Duration? animationDuration,
Create a copy with modified values
Implementation
CustomDropdownConfig copyWith({
double? height,
double? radius,
EdgeInsets? padding,
Color? borderColor,
Color? dropdownColor,
Color? disabledColor,
Color? errorBorderColor,
double? menuMaxHeight,
bool? showDivider,
bool? enableSearch,
String? searchHint,
String? noResultsText,
double? elevation,
double? borderWidth,
double? focusedBorderWidth,
double? errorBorderWidth,
Color? searchIconColor,
Color? selectedItemColor,
TextStyle? itemTextStyle,
TextStyle? selectedTextStyle,
Color? shadowColor,
double? menuOffset,
Duration? animationDuration,
}) {
return CustomDropdownConfig(
height: height ?? this.height,
radius: radius ?? this.radius,
padding: padding ?? this.padding,
borderColor: borderColor ?? this.borderColor,
dropdownColor: dropdownColor ?? this.dropdownColor,
disabledColor: disabledColor ?? this.disabledColor,
errorBorderColor: errorBorderColor ?? this.errorBorderColor,
menuMaxHeight: menuMaxHeight ?? this.menuMaxHeight,
showDivider: showDivider ?? this.showDivider,
enableSearch: enableSearch ?? this.enableSearch,
searchHint: searchHint ?? this.searchHint,
noResultsText: noResultsText ?? this.noResultsText,
elevation: elevation ?? this.elevation,
borderWidth: borderWidth ?? this.borderWidth,
focusedBorderWidth: focusedBorderWidth ?? this.focusedBorderWidth,
errorBorderWidth: errorBorderWidth ?? this.errorBorderWidth,
searchIconColor: searchIconColor ?? this.searchIconColor,
selectedItemColor: selectedItemColor ?? this.selectedItemColor,
itemTextStyle: itemTextStyle ?? this.itemTextStyle,
selectedTextStyle: selectedTextStyle ?? this.selectedTextStyle,
shadowColor: shadowColor ?? this.shadowColor,
menuOffset: menuOffset ?? this.menuOffset,
animationDuration: animationDuration ?? this.animationDuration,
);
}