create static method

MessageSendOptions create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "messageSendOptions",
  3. String special_return_type = "messageSendOptions",
  4. bool? disable_notification,
  5. bool? from_background,
  6. bool? protect_content,
  7. bool? allow_paid_broadcast,
  8. num? paid_message_star_count,
  9. bool? update_order_of_installed_sticker_sets,
  10. MessageSchedulingState? scheduling_state,
  11. num? effect_id,
  12. num? sending_id,
  13. bool? only_preview,
})
override

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

Implementation

static MessageSendOptions create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "messageSendOptions",
  String special_return_type = "messageSendOptions",
  bool? disable_notification,
  bool? from_background,
  bool? protect_content,
  bool? allow_paid_broadcast,
  num? paid_message_star_count,
  bool? update_order_of_installed_sticker_sets,
  MessageSchedulingState? scheduling_state,
  num? effect_id,
  num? sending_id,
  bool? only_preview,
}) {
  // MessageSendOptions messageSendOptions = MessageSendOptions({
  final Map messageSendOptions_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "disable_notification": disable_notification,
    "from_background": from_background,
    "protect_content": protect_content,
    "allow_paid_broadcast": allow_paid_broadcast,
    "paid_message_star_count": paid_message_star_count,
    "update_order_of_installed_sticker_sets": update_order_of_installed_sticker_sets,
    "scheduling_state": (scheduling_state != null) ? scheduling_state.toJson() : null,
    "effect_id": effect_id,
    "sending_id": sending_id,
    "only_preview": only_preview,
  };

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

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