copyWith method
CommandProps
copyWith({
- bool? isOpen,
- void onClose()?,
- List<
CommandGroupProps> ? groups, - String? placeholder,
- String? emptyMessage,
- String? searchQuery,
- List<
CommandItemProps> ? filteredItems, - void onSearch()?,
- void onSelectItem()?,
Implementation
CommandProps copyWith({
bool? isOpen,
void Function()? onClose,
List<CommandGroupProps>? groups,
String? placeholder,
String? emptyMessage,
String? searchQuery,
List<CommandItemProps>? filteredItems,
void Function(String)? onSearch,
void Function(CommandItemProps)? onSelectItem,
}) {
return CommandProps(
isOpen: isOpen ?? this.isOpen,
onClose: onClose ?? this.onClose,
groups: groups ?? this.groups,
placeholder: placeholder ?? this.placeholder,
emptyMessage: emptyMessage ?? this.emptyMessage,
searchQuery: searchQuery ?? this.searchQuery,
filteredItems: filteredItems ?? this.filteredItems,
onSearch: onSearch ?? this.onSearch,
onSelectItem: onSelectItem ?? this.onSelectItem,
);
}