create static method

ChatFolderInfo create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatFolderInfo",
  3. String special_return_type = "chatFolderInfo",
  4. num? id,
  5. ChatFolderName? name,
  6. ChatFolderIcon? icon,
  7. num? color_id,
  8. bool? is_shareable,
  9. bool? has_my_invite_links,
})
override

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

Implementation

static ChatFolderInfo create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatFolderInfo",
  String special_return_type = "chatFolderInfo",
  num? id,
  ChatFolderName? name,
  ChatFolderIcon? icon,
  num? color_id,
  bool? is_shareable,
  bool? has_my_invite_links,
}) {
  // ChatFolderInfo chatFolderInfo = ChatFolderInfo({
  final Map chatFolderInfo_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "id": id,
    "name": (name != null) ? name.toJson() : null,
    "icon": (icon != null) ? icon.toJson() : null,
    "color_id": color_id,
    "is_shareable": is_shareable,
    "has_my_invite_links": has_my_invite_links,
  };

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

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