create static method

BotCommands create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "botCommands",
  3. String special_return_type = "botCommands",
  4. num? bot_user_id,
  5. List<BotCommand>? commands,
})
override

Generate By General Universe Script Dont edit by hand or anything manual

Implementation

static BotCommands create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "botCommands",
  String special_return_type = "botCommands",
  num? bot_user_id,
  List<BotCommand>? commands,
}) {
  // BotCommands botCommands = BotCommands({
  final Map botCommands_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "bot_user_id": bot_user_id,
    "commands": (commands != null) ? commands.toJson() : null,
  };

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

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