copyWith method

Poll copyWith({
  1. int? id,
  2. String? question,
  3. List<PollOption>? options,
  4. int? totalVoterCount,
  5. List<int>? recentVoterUserIds,
  6. bool? isAnonymous,
  7. PollType? type,
  8. int? openPeriod,
  9. int? closeDate,
  10. bool? isClosed,
})

Implementation

Poll copyWith({
  int? id,
  String? question,
  List<PollOption>? options,
  int? totalVoterCount,
  List<int>? recentVoterUserIds,
  bool? isAnonymous,
  PollType? type,
  int? openPeriod,
  int? closeDate,
  bool? isClosed,
}) => Poll(
  id: id ?? this.id,
  question: question ?? this.question,
  options: options ?? this.options,
  totalVoterCount: totalVoterCount ?? this.totalVoterCount,
  recentVoterUserIds: recentVoterUserIds ?? this.recentVoterUserIds,
  isAnonymous: isAnonymous ?? this.isAnonymous,
  type: type ?? this.type,
  openPeriod: openPeriod ?? this.openPeriod,
  closeDate: closeDate ?? this.closeDate,
  isClosed: isClosed ?? this.isClosed,
);