copyWith method

  1. @override
SmartSearchTheme copyWith({
  1. Color? searchBoxBackgroundColor,
  2. Color? searchBoxTextColor,
  3. Color? searchBoxHintColor,
  4. Color? searchBoxBorderColor,
  5. Color? searchBoxFocusedBorderColor,
  6. Color? searchBoxIconColor,
  7. Color? searchBoxCursorColor,
  8. BorderRadius? searchBoxBorderRadius,
  9. double? searchBoxElevation,
  10. Color? searchBoxShadowColor,
  11. Color? overlayBackgroundColor,
  12. Color? overlayBorderColor,
  13. BorderRadius? overlayBorderRadius,
  14. double? overlayElevation,
  15. Color? overlayShadowColor,
  16. Color? itemBackgroundColor,
  17. Color? itemHoverColor,
  18. Color? itemFocusedColor,
  19. Color? itemSelectedColor,
  20. Color? itemTextColor,
  21. Color? itemSubtitleColor,
  22. Color? itemIconColor,
  23. Color? itemDividerColor,
  24. Color? loadingIndicatorColor,
  25. Color? emptyStateIconColor,
  26. Color? emptyStateTextColor,
  27. Color? errorIconColor,
  28. Color? errorTextColor,
  29. Color? errorButtonColor,
  30. Color? scrollbarColor,
  31. double? scrollbarThickness,
  32. Radius? scrollbarRadius,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
SmartSearchTheme copyWith({
  // Search Box
  Color? searchBoxBackgroundColor,
  Color? searchBoxTextColor,
  Color? searchBoxHintColor,
  Color? searchBoxBorderColor,
  Color? searchBoxFocusedBorderColor,
  Color? searchBoxIconColor,
  Color? searchBoxCursorColor,
  BorderRadius? searchBoxBorderRadius,
  double? searchBoxElevation,
  Color? searchBoxShadowColor,

  // Overlay
  Color? overlayBackgroundColor,
  Color? overlayBorderColor,
  BorderRadius? overlayBorderRadius,
  double? overlayElevation,
  Color? overlayShadowColor,

  // Items
  Color? itemBackgroundColor,
  Color? itemHoverColor,
  Color? itemFocusedColor,
  Color? itemSelectedColor,
  Color? itemTextColor,
  Color? itemSubtitleColor,
  Color? itemIconColor,
  Color? itemDividerColor,

  // States
  Color? loadingIndicatorColor,
  Color? emptyStateIconColor,
  Color? emptyStateTextColor,
  Color? errorIconColor,
  Color? errorTextColor,
  Color? errorButtonColor,

  // Scrollbar
  Color? scrollbarColor,
  double? scrollbarThickness,
  Radius? scrollbarRadius,
}) {
  return SmartSearchTheme(
    searchBoxBackgroundColor:
        searchBoxBackgroundColor ?? this.searchBoxBackgroundColor,
    searchBoxTextColor: searchBoxTextColor ?? this.searchBoxTextColor,
    searchBoxHintColor: searchBoxHintColor ?? this.searchBoxHintColor,
    searchBoxBorderColor: searchBoxBorderColor ?? this.searchBoxBorderColor,
    searchBoxFocusedBorderColor:
        searchBoxFocusedBorderColor ?? this.searchBoxFocusedBorderColor,
    searchBoxIconColor: searchBoxIconColor ?? this.searchBoxIconColor,
    searchBoxCursorColor: searchBoxCursorColor ?? this.searchBoxCursorColor,
    searchBoxBorderRadius:
        searchBoxBorderRadius ?? this.searchBoxBorderRadius,
    searchBoxElevation: searchBoxElevation ?? this.searchBoxElevation,
    searchBoxShadowColor: searchBoxShadowColor ?? this.searchBoxShadowColor,
    overlayBackgroundColor:
        overlayBackgroundColor ?? this.overlayBackgroundColor,
    overlayBorderColor: overlayBorderColor ?? this.overlayBorderColor,
    overlayBorderRadius: overlayBorderRadius ?? this.overlayBorderRadius,
    overlayElevation: overlayElevation ?? this.overlayElevation,
    overlayShadowColor: overlayShadowColor ?? this.overlayShadowColor,
    itemBackgroundColor: itemBackgroundColor ?? this.itemBackgroundColor,
    itemHoverColor: itemHoverColor ?? this.itemHoverColor,
    itemFocusedColor: itemFocusedColor ?? this.itemFocusedColor,
    itemSelectedColor: itemSelectedColor ?? this.itemSelectedColor,
    itemTextColor: itemTextColor ?? this.itemTextColor,
    itemSubtitleColor: itemSubtitleColor ?? this.itemSubtitleColor,
    itemIconColor: itemIconColor ?? this.itemIconColor,
    itemDividerColor: itemDividerColor ?? this.itemDividerColor,
    loadingIndicatorColor:
        loadingIndicatorColor ?? this.loadingIndicatorColor,
    emptyStateIconColor: emptyStateIconColor ?? this.emptyStateIconColor,
    emptyStateTextColor: emptyStateTextColor ?? this.emptyStateTextColor,
    errorIconColor: errorIconColor ?? this.errorIconColor,
    errorTextColor: errorTextColor ?? this.errorTextColor,
    errorButtonColor: errorButtonColor ?? this.errorButtonColor,
    scrollbarColor: scrollbarColor ?? this.scrollbarColor,
    scrollbarThickness: scrollbarThickness ?? this.scrollbarThickness,
    scrollbarRadius: scrollbarRadius ?? this.scrollbarRadius,
  );
}