CollectivePoll class
A poll/vote within a collective.
Stored as subcollection collectives/{id}/polls/{pollId}
or embedded in chat messages.
Constructors
-
CollectivePoll({String id = '', String collectiveId = '', String question = '', List<
PollOption> options = const [], String createdBy = '', String creatorName = '', int createdAt = 0, int expiresAt = 0, bool isAnonymous = false, bool isMultiChoice = false, bool isClosed = false}) -
CollectivePoll.fromJSON(Map<
String, dynamic> data) -
factory
Properties
- collectiveId ↔ String
-
getter/setter pair
- createdAt ↔ int
-
getter/setter pair
- createdBy ↔ String
-
getter/setter pair
- creatorName ↔ String
-
getter/setter pair
- expiresAt ↔ int
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String
-
getter/setter pair
- isAnonymous ↔ bool
-
getter/setter pair
- isClosed ↔ bool
-
getter/setter pair
- isMultiChoice ↔ bool
-
getter/setter pair
-
options
↔ List<
PollOption> -
getter/setter pair
- question ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalVotes → int
-
no setter
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.
inherited