create static method

AddBotMediaPreview create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "addBotMediaPreview",
  3. String special_return_type = "botMediaPreview",
  4. bool? is_tdlib_method,
  5. num? bot_user_id,
  6. String? language_code,
  7. InputStoryContent? content,
})
override

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

Implementation

static AddBotMediaPreview create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "addBotMediaPreview",
  String special_return_type = "botMediaPreview",
  bool? is_tdlib_method,
  num? bot_user_id,
  String? language_code,
  InputStoryContent? content,
}) {
  // AddBotMediaPreview addBotMediaPreview = AddBotMediaPreview({
  final Map addBotMediaPreview_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "bot_user_id": bot_user_id,
    "language_code": language_code,
    "content": (content != null) ? content.toJson() : null,
  };

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

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