createPollOption method

Future<Response> createPollOption({
  1. required int? pollQuestion,
  2. required String option,
})

Implementation

Future<http.Response> createPollOption({
  required int? pollQuestion,
  required String option,
}) {
  var data = json.encode({"pollQuestion": pollQuestion, "option": option});
  log(data);

  return post(Uri.parse('$apiURL/poll-options/create'),
      headers: {
        "token":
            "cnejwi8c9wehnd8fchni2x239jxexnjx2n23i8xn3oifr0cwd32fjnrf453vreve",
        "content-type": 'application/json',
      },
      body: data);
}