PollAnswer class abstract
This object represents an answer of a user in a non-anonymous poll.
- Annotations
-
- @freezed
Constructors
-
PollAnswer.new({@JsonKey(name: 'poll_id') required String pollId, @JsonKey(name: 'user') User? user, @JsonKey(name: 'option_ids') required List<
int> optionIds, @JsonKey(name: 'voter_chat') Chat? voterChat}) -
Constructs a PollAnswer object
constfactory
-
PollAnswer.fromJson(Map<
String, dynamic> json) -
Creates a PollAnswer object from JSON object
factory
Properties
-
copyWith
→ $PollAnswerCopyWith<
PollAnswer> -
Create a copy of PollAnswer
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
optionIds
→ List<
int> -
0-based identifiers of answer options, chosen by the user. May be empty
if the user retracted their vote.
no setterinherited
- pollId → String
-
Unique poll identifier
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- user → User?
-
The user, who changed the answer to the poll
no setterinherited
- voterChat → Chat?
-
Optional. The chat that changed the answer to the poll, if the voter is
anonymous
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this PollAnswer to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited