PollVote class
A model class representing a poll vote.
- Annotations
-
- @JsonSerializable.new()
Constructors
Properties
- answerText → String?
-
The text of the answer provided in the poll.
final
- createdAt → DateTime
-
The date when the poll vote was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The unique identifier of the poll vote.
final
- isAnswer → bool
-
If true, the vote is an answer.
final
- optionId → String?
-
The unique identifier of the option selected in the poll.
final
- pollId → String?
-
The unique identifier of the poll the vote belongs to.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited - updatedAt → DateTime
-
The date when the poll vote was last updated.
final
- user → User?
-
The user who casted the vote.
final
- userId → String?
-
The unique identifier of the user who voted.
final
Methods
-
copyWith(
{String? id, String? pollId, String? optionId, String? answerText, DateTime? createdAt, DateTime? updatedAt, String? userId, User? user}) → PollVote - Creates a copy of PollVote with specified attributes overridden.
-
getComparableField(
String sortKey) → ComparableField? -
Gets a comparable field value for the given
sortKey. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serialize to json
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited