copyWith method

Poll<T> copyWith({
  1. String? title,
  2. List<PollOption<T>>? options,
  3. DateTime? endsAt,
  4. bool? allowsMultipleAnswers,
  5. bool? isEditable,
})

Implementation

Poll<T> copyWith({
  String? title,
  List<PollOption<T>>? options,
  DateTime? endsAt,
  bool? allowsMultipleAnswers,
  bool? isEditable,
}) {
  return Poll<T>(
    title: title ?? this.title,
    options: options ?? this.options,
    endsAt: endsAt ?? this.endsAt,
    allowsMultipleAnswers:
        allowsMultipleAnswers ?? this.allowsMultipleAnswers,
    isEditable: isEditable ?? this.isEditable,
  );
}