Poll constructor

Poll({
  1. Map<String, Object> custom = const {},
  2. required bool allowAnswers,
  3. required bool allowUserSuggestedOptions,
  4. required int answersCount,
  5. required DateTime createdAt,
  6. UserObject? createdBy,
  7. required String createdById,
  8. required String description,
  9. required bool enforceUniqueVote,
  10. required String id,
  11. bool? isClosed,
  12. List<PollVote> latestAnswers = const [],
  13. Map<String, List<PollVote>> latestVotesByOption = const {},
  14. int? maxVotesAllowed,
  15. required String name,
  16. List<PollOption> options = const [],
  17. List<PollVote> ownVotes = const [],
  18. required DateTime updatedAt,
  19. required int voteCount,
  20. Map<String, int> voteCountsByOption = const {},
  21. String? votingVisibility,
})

Returns a new Poll instance.

Implementation

Poll({
  this.custom = const {},
  required this.allowAnswers,
  required this.allowUserSuggestedOptions,
  required this.answersCount,
  required this.createdAt,
  this.createdBy,
  required this.createdById,
  required this.description,
  required this.enforceUniqueVote,
  required this.id,
  this.isClosed,
  this.latestAnswers = const [],
  this.latestVotesByOption = const {},
  this.maxVotesAllowed,
  required this.name,
  this.options = const [],
  this.ownVotes = const [],
  required this.updatedAt,
  required this.voteCount,
  this.voteCountsByOption = const {},
  this.votingVisibility,
});