create static method

UpdatePollAnswer create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "updatePollAnswer",
  3. String special_return_type = "update",
  4. num? poll_id,
  5. MessageSender? voter_id,
  6. List<num>? option_ids,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static UpdatePollAnswer create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "updatePollAnswer",
  String special_return_type = "update",
  num? poll_id,
  MessageSender? voter_id,
  List<num>? option_ids,
}) {
  // UpdatePollAnswer updatePollAnswer = UpdatePollAnswer({
  final Map updatePollAnswer_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "poll_id": poll_id,
    "voter_id": (voter_id != null) ? voter_id.toJson() : null,
    "option_ids": option_ids,
  };

  updatePollAnswer_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (updatePollAnswer_data_create_json.containsKey(key) == false) {
        updatePollAnswer_data_create_json[key] = value;
      }
    });
  }
  return UpdatePollAnswer(updatePollAnswer_data_create_json);
}