create static method
BotInfo
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "botInfo",
- String special_return_type = "botInfo",
- String? short_description,
- String? description,
- Photo? photo,
- Animation? animation,
- List<
BotCommand> ? commands, - String? privacy_policy_url,
- ChatAdministratorRights? default_group_administrator_rights,
- ChatAdministratorRights? default_channel_administrator_rights,
- AffiliateProgramInfo? affiliate_program,
- num? web_app_background_light_color,
- num? web_app_background_dark_color,
- num? web_app_header_light_color,
- num? web_app_header_dark_color,
- BotVerificationParameters? verification_parameters,
- bool? can_get_revenue_statistics,
- bool? can_manage_emoji_status,
- bool? has_media_previews,
- InternalLinkType? edit_commands_link,
- InternalLinkType? edit_description_link,
- InternalLinkType? edit_description_media_link,
- InternalLinkType? edit_settings_link,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static BotInfo create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "botInfo",
String special_return_type = "botInfo",
String? short_description,
String? description,
Photo? photo,
Animation? animation,
BotMenuButton? menu_button,
List<BotCommand>? commands,
String? privacy_policy_url,
ChatAdministratorRights? default_group_administrator_rights,
ChatAdministratorRights? default_channel_administrator_rights,
AffiliateProgramInfo? affiliate_program,
num? web_app_background_light_color,
num? web_app_background_dark_color,
num? web_app_header_light_color,
num? web_app_header_dark_color,
BotVerificationParameters? verification_parameters,
bool? can_get_revenue_statistics,
bool? can_manage_emoji_status,
bool? has_media_previews,
InternalLinkType? edit_commands_link,
InternalLinkType? edit_description_link,
InternalLinkType? edit_description_media_link,
InternalLinkType? edit_settings_link,
}) {
// BotInfo botInfo = BotInfo({
final Map botInfo_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"short_description": short_description,
"description": description,
"photo": (photo != null) ? photo.toJson() : null,
"animation": (animation != null) ? animation.toJson() : null,
"menu_button": (menu_button != null) ? menu_button.toJson() : null,
"commands": (commands != null) ? commands.toJson() : null,
"privacy_policy_url": privacy_policy_url,
"default_group_administrator_rights": (default_group_administrator_rights != null) ? default_group_administrator_rights.toJson() : null,
"default_channel_administrator_rights": (default_channel_administrator_rights != null) ? default_channel_administrator_rights.toJson() : null,
"affiliate_program": (affiliate_program != null) ? affiliate_program.toJson() : null,
"web_app_background_light_color": web_app_background_light_color,
"web_app_background_dark_color": web_app_background_dark_color,
"web_app_header_light_color": web_app_header_light_color,
"web_app_header_dark_color": web_app_header_dark_color,
"verification_parameters": (verification_parameters != null) ? verification_parameters.toJson() : null,
"can_get_revenue_statistics": can_get_revenue_statistics,
"can_manage_emoji_status": can_manage_emoji_status,
"has_media_previews": has_media_previews,
"edit_commands_link": (edit_commands_link != null) ? edit_commands_link.toJson() : null,
"edit_description_link": (edit_description_link != null) ? edit_description_link.toJson() : null,
"edit_description_media_link": (edit_description_media_link != null) ? edit_description_media_link.toJson() : null,
"edit_settings_link": (edit_settings_link != null) ? edit_settings_link.toJson() : null,
};
botInfo_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (botInfo_data_create_json.containsKey(key) == false) {
botInfo_data_create_json[key] = value;
}
});
}
return BotInfo(botInfo_data_create_json);
}