Poll class

Constructors

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<PollVote>> latestVotesByOption = const {}, 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.

Properties

allowAnswers bool
getter/setter pair
allowUserSuggestedOptions bool
getter/setter pair
answersCount int
getter/setter pair
createdAt DateTime
getter/setter pair
createdBy UserObject?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
createdById String
getter/setter pair
custom Map<String, Object>
getter/setter pair
description String
getter/setter pair
enforceUniqueVote bool
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
getter/setter pair
isClosed bool?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
latestAnswers List<PollVote>
getter/setter pair
latestVotesByOption Map<String, List<PollVote>>
getter/setter pair
maxVotesAllowed int?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
name String
getter/setter pair
options List<PollOption>
getter/setter pair
ownVotes List<PollVote>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updatedAt DateTime
getter/setter pair
voteCount int
getter/setter pair
voteCountsByOption Map<String, int>
getter/setter pair
votingVisibility String?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromJson(dynamic value) Poll?
Returns a new Poll instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<Poll>
mapFromJson(dynamic json) Map<String, Poll>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<Poll>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.