copyWith method

CustomDropdownConfig copyWith({
  1. double? height,
  2. double? radius,
  3. EdgeInsets? padding,
  4. Color? borderColor,
  5. Color? dropdownColor,
  6. Color? disabledColor,
  7. Color? errorBorderColor,
  8. double? menuMaxHeight,
  9. bool? showDivider,
  10. bool? enableSearch,
  11. String? searchHint,
  12. String? noResultsText,
  13. double? elevation,
  14. double? borderWidth,
  15. double? focusedBorderWidth,
  16. double? errorBorderWidth,
  17. Color? searchIconColor,
  18. Color? selectedItemColor,
  19. TextStyle? itemTextStyle,
  20. TextStyle? selectedTextStyle,
  21. Color? shadowColor,
  22. double? menuOffset,
  23. 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,
  );
}