create static method

ChatNotificationSettings create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatNotificationSettings",
  3. String special_return_type = "chatNotificationSettings",
  4. bool? use_default_mute_for,
  5. num? mute_for,
  6. bool? use_default_sound,
  7. num? sound_id,
  8. bool? use_default_show_preview,
  9. bool? show_preview,
  10. bool? use_default_mute_stories,
  11. bool? mute_stories,
  12. bool? use_default_story_sound,
  13. num? story_sound_id,
  14. bool? use_default_show_story_sender,
  15. bool? show_story_sender,
  16. bool? use_default_disable_pinned_message_notifications,
  17. bool? disable_pinned_message_notifications,
  18. bool? use_default_disable_mention_notifications,
  19. bool? disable_mention_notifications,
})
override

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

Implementation

static ChatNotificationSettings create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatNotificationSettings",
  String special_return_type = "chatNotificationSettings",
  bool? use_default_mute_for,
  num? mute_for,
  bool? use_default_sound,
  num? sound_id,
  bool? use_default_show_preview,
  bool? show_preview,
  bool? use_default_mute_stories,
  bool? mute_stories,
  bool? use_default_story_sound,
  num? story_sound_id,
  bool? use_default_show_story_sender,
  bool? show_story_sender,
  bool? use_default_disable_pinned_message_notifications,
  bool? disable_pinned_message_notifications,
  bool? use_default_disable_mention_notifications,
  bool? disable_mention_notifications,
}) {
  // ChatNotificationSettings chatNotificationSettings = ChatNotificationSettings({
  final Map chatNotificationSettings_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "use_default_mute_for": use_default_mute_for,
    "mute_for": mute_for,
    "use_default_sound": use_default_sound,
    "sound_id": sound_id,
    "use_default_show_preview": use_default_show_preview,
    "show_preview": show_preview,
    "use_default_mute_stories": use_default_mute_stories,
    "mute_stories": mute_stories,
    "use_default_story_sound": use_default_story_sound,
    "story_sound_id": story_sound_id,
    "use_default_show_story_sender": use_default_show_story_sender,
    "show_story_sender": show_story_sender,
    "use_default_disable_pinned_message_notifications": use_default_disable_pinned_message_notifications,
    "disable_pinned_message_notifications": disable_pinned_message_notifications,
    "use_default_disable_mention_notifications": use_default_disable_mention_notifications,
    "disable_mention_notifications": disable_mention_notifications,
  };

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

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