Poll constructor
Poll({
- Map<
String, Object> custom = const {}, - required bool allowAnswers,
- required bool allowUserSuggestedOptions,
- required int answersCount,
- required DateTime createdAt,
- UserObject? createdBy,
- required String createdById,
- required String description,
- required bool enforceUniqueVote,
- required String id,
- bool? isClosed,
- List<
PollVote> latestAnswers = const [], - Map<
String, List< latestVotesByOption = const {},PollVote> > - int? maxVotesAllowed,
- required String name,
- List<
PollOption> options = const [], - List<
PollVote> ownVotes = const [], - required DateTime updatedAt,
- required int voteCount,
- Map<
String, int> voteCountsByOption = const {}, - 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,
});