PollAnswer constructor

const PollAnswer({
  1. @JsonKey(name: 'poll_id') required String pollId,
  2. @JsonKey(name: 'user') User? user,
  3. @JsonKey(name: 'option_ids') required List<int> optionIds,
  4. @JsonKey(name: 'voter_chat') Chat? voterChat,
})

Constructs a PollAnswer object

Implementation

const factory PollAnswer({
  /// Unique poll identifier
  @JsonKey(name: 'poll_id') required String pollId,

  /// The user, who changed the answer to the poll
  @JsonKey(name: 'user') User? user,

  /// 0-based identifiers of answer options, chosen by the user. May be empty
  /// if the user retracted their vote.
  @JsonKey(name: 'option_ids') required List<int> optionIds,

  /// Optional. The chat that changed the answer to the poll, if the voter is
  /// anonymous
  @JsonKey(name: 'voter_chat') Chat? voterChat,
}) = _PollAnswer;