create static method
Chat
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "chat",
- String special_return_type = "chat",
- num? id,
- ChatType? type,
- String? title,
- ChatPhotoInfo? photo,
- num? accent_color_id,
- num? background_custom_emoji_id,
- num? profile_accent_color_id,
- num? profile_background_custom_emoji_id,
- ChatPermissions? permissions,
- Message? last_message,
- List<
ChatPosition> ? positions, - List<
ChatList> ? chat_lists, - MessageSender? message_sender_id,
- BlockList? block_list,
- bool? has_protected_content,
- bool? is_translatable,
- bool? is_marked_as_unread,
- bool? view_as_topics,
- bool? has_scheduled_messages,
- bool? can_be_deleted_only_for_self,
- bool? can_be_deleted_for_all_users,
- bool? can_be_reported,
- bool? default_disable_notification,
- num? unread_count,
- num? last_read_inbox_message_id,
- num? last_read_outbox_message_id,
- num? unread_mention_count,
- num? unread_reaction_count,
- ChatNotificationSettings? notification_settings,
- ChatAvailableReactions? available_reactions,
- num? message_auto_delete_time,
- EmojiStatus? emoji_status,
- ChatBackground? background,
- String? theme_name,
- ChatActionBar? action_bar,
- BusinessBotManageBar? business_bot_manage_bar,
- VideoChat? video_chat,
- ChatJoinRequestsInfo? pending_join_requests,
- num? reply_markup_message_id,
- DraftMessage? draft_message,
- String? client_data,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static Chat create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "chat",
String special_return_type = "chat",
num? id,
ChatType? type,
String? title,
ChatPhotoInfo? photo,
num? accent_color_id,
num? background_custom_emoji_id,
num? profile_accent_color_id,
num? profile_background_custom_emoji_id,
ChatPermissions? permissions,
Message? last_message,
List<ChatPosition>? positions,
List<ChatList>? chat_lists,
MessageSender? message_sender_id,
BlockList? block_list,
bool? has_protected_content,
bool? is_translatable,
bool? is_marked_as_unread,
bool? view_as_topics,
bool? has_scheduled_messages,
bool? can_be_deleted_only_for_self,
bool? can_be_deleted_for_all_users,
bool? can_be_reported,
bool? default_disable_notification,
num? unread_count,
num? last_read_inbox_message_id,
num? last_read_outbox_message_id,
num? unread_mention_count,
num? unread_reaction_count,
ChatNotificationSettings? notification_settings,
ChatAvailableReactions? available_reactions,
num? message_auto_delete_time,
EmojiStatus? emoji_status,
ChatBackground? background,
String? theme_name,
ChatActionBar? action_bar,
BusinessBotManageBar? business_bot_manage_bar,
VideoChat? video_chat,
ChatJoinRequestsInfo? pending_join_requests,
num? reply_markup_message_id,
DraftMessage? draft_message,
String? client_data,
}) {
// Chat chat = Chat({
final Map chat_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"id": id,
"type": (type != null) ? type.toJson() : null,
"title": title,
"photo": (photo != null) ? photo.toJson() : null,
"accent_color_id": accent_color_id,
"background_custom_emoji_id": background_custom_emoji_id,
"profile_accent_color_id": profile_accent_color_id,
"profile_background_custom_emoji_id": profile_background_custom_emoji_id,
"permissions": (permissions != null) ? permissions.toJson() : null,
"last_message": (last_message != null) ? last_message.toJson() : null,
"positions": (positions != null) ? positions.toJson() : null,
"chat_lists": (chat_lists != null) ? chat_lists.toJson() : null,
"message_sender_id": (message_sender_id != null) ? message_sender_id.toJson() : null,
"block_list": (block_list != null) ? block_list.toJson() : null,
"has_protected_content": has_protected_content,
"is_translatable": is_translatable,
"is_marked_as_unread": is_marked_as_unread,
"view_as_topics": view_as_topics,
"has_scheduled_messages": has_scheduled_messages,
"can_be_deleted_only_for_self": can_be_deleted_only_for_self,
"can_be_deleted_for_all_users": can_be_deleted_for_all_users,
"can_be_reported": can_be_reported,
"default_disable_notification": default_disable_notification,
"unread_count": unread_count,
"last_read_inbox_message_id": last_read_inbox_message_id,
"last_read_outbox_message_id": last_read_outbox_message_id,
"unread_mention_count": unread_mention_count,
"unread_reaction_count": unread_reaction_count,
"notification_settings": (notification_settings != null) ? notification_settings.toJson() : null,
"available_reactions": (available_reactions != null) ? available_reactions.toJson() : null,
"message_auto_delete_time": message_auto_delete_time,
"emoji_status": (emoji_status != null) ? emoji_status.toJson() : null,
"background": (background != null) ? background.toJson() : null,
"theme_name": theme_name,
"action_bar": (action_bar != null) ? action_bar.toJson() : null,
"business_bot_manage_bar": (business_bot_manage_bar != null) ? business_bot_manage_bar.toJson() : null,
"video_chat": (video_chat != null) ? video_chat.toJson() : null,
"pending_join_requests": (pending_join_requests != null) ? pending_join_requests.toJson() : null,
"reply_markup_message_id": reply_markup_message_id,
"draft_message": (draft_message != null) ? draft_message.toJson() : null,
"client_data": client_data,
};
chat_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (chat_data_create_json.containsKey(key) == false) {
chat_data_create_json[key] = value;
}
});
}
return Chat(chat_data_create_json);
}