PollVoteRequest constructor Null safety

PollVoteRequest(
  1. {required int pollId,
  2. required List<int> pollOptionIds,
  3. required String channelUrl,
  4. required ChannelType channelType}
)

Implementation

PollVoteRequest(
    {required int pollId,
    required List<int> pollOptionIds,
    required String channelUrl,
    required ChannelType channelType}) {
  url = 'polls/$pollId/vote';
  body = {
    'option_ids': pollOptionIds,
    'channel_url': channelUrl,
    'channel_type': channelType.urlString,
  };
}