copyWith method

MultiSelectorItem<T> copyWith({
  1. T? value,
  2. String? label,
  3. bool? selected,
})

Creates a copy of this item with the given fields replaced with new values.

Implementation

MultiSelectorItem<T> copyWith({
  T? value,
  String? label,
  bool? selected,
}) {
  return MultiSelectorItem(
    value ?? this.value,
    label ?? this.label,
    selected: selected ?? this.selected,
  );
}