copyWith method

SelectableItem<T> copyWith({
  1. String? title,
  2. bool? isSelected,
  3. T? value,
})

Creates a copy of the SelectableItem with optional parameter overrides.

Implementation

SelectableItem<T> copyWith({
  String? title,
  bool? isSelected,
  T? value,
}) {
  return SelectableItem(
    title: title ?? this.title,
    isSelected: isSelected ?? this.isSelected,
    value: value ?? this.value,
  );
}