copyWith method

void copyWith({
  1. String? nameSelected,
  2. int? id,
  3. int? index,
})

Implementation

void copyWith({
  String? nameSelected,
  int? id,
  int? index,
}) {
  this.name = nameSelected ?? this.name;
  this.id = id ?? this.id;
  this.index = index ?? this.index;
}