create static method

ChatFolder create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatFolder",
  3. String special_return_type = "chatFolder",
  4. ChatFolderName? name,
  5. ChatFolderIcon? icon,
  6. num? color_id,
  7. bool? is_shareable,
  8. List<num>? pinned_chat_ids,
  9. List<num>? included_chat_ids,
  10. List<num>? excluded_chat_ids,
  11. bool? exclude_muted,
  12. bool? exclude_read,
  13. bool? exclude_archived,
  14. bool? include_contacts,
  15. bool? include_non_contacts,
  16. bool? include_bots,
  17. bool? include_groups,
  18. bool? include_channels,
})
override

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

Implementation

static ChatFolder create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatFolder",
  String special_return_type = "chatFolder",
  ChatFolderName? name,
  ChatFolderIcon? icon,
  num? color_id,
  bool? is_shareable,
  List<num>? pinned_chat_ids,
  List<num>? included_chat_ids,
  List<num>? excluded_chat_ids,
  bool? exclude_muted,
  bool? exclude_read,
  bool? exclude_archived,
  bool? include_contacts,
  bool? include_non_contacts,
  bool? include_bots,
  bool? include_groups,
  bool? include_channels,
}) {
  // ChatFolder chatFolder = ChatFolder({
  final Map chatFolder_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "name": (name != null) ? name.toJson() : null,
    "icon": (icon != null) ? icon.toJson() : null,
    "color_id": color_id,
    "is_shareable": is_shareable,
    "pinned_chat_ids": pinned_chat_ids,
    "included_chat_ids": included_chat_ids,
    "excluded_chat_ids": excluded_chat_ids,
    "exclude_muted": exclude_muted,
    "exclude_read": exclude_read,
    "exclude_archived": exclude_archived,
    "include_contacts": include_contacts,
    "include_non_contacts": include_non_contacts,
    "include_bots": include_bots,
    "include_groups": include_groups,
    "include_channels": include_channels,
  };

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

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