create static method

ReplyMarkup create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "replyMarkup",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "replyMarkup",
  5. ReplyMarkupRemoveKeyboard? reply_markup_remove_keyboard,
  6. ReplyMarkupForceReply? reply_markup_force_reply,
  7. ReplyMarkupShowKeyboard? reply_markup_show_keyboard,
  8. ReplyMarkupInlineKeyboard? reply_markup_inline_keyboard,
})
override

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

Implementation

static ReplyMarkup create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "replyMarkup",
  bool special_is_json_scheme_class = true,
  String special_return_type = "replyMarkup",
  ReplyMarkupRemoveKeyboard? reply_markup_remove_keyboard,
  ReplyMarkupForceReply? reply_markup_force_reply,
  ReplyMarkupShowKeyboard? reply_markup_show_keyboard,
  ReplyMarkupInlineKeyboard? reply_markup_inline_keyboard,
}) {
  // ReplyMarkup replyMarkup = ReplyMarkup({
  final Map replyMarkup_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "reply_markup_remove_keyboard": (reply_markup_remove_keyboard != null) ? reply_markup_remove_keyboard.toJson() : null,
    "reply_markup_force_reply": (reply_markup_force_reply != null) ? reply_markup_force_reply.toJson() : null,
    "reply_markup_show_keyboard": (reply_markup_show_keyboard != null) ? reply_markup_show_keyboard.toJson() : null,
    "reply_markup_inline_keyboard": (reply_markup_inline_keyboard != null) ? reply_markup_inline_keyboard.toJson() : null,
  };

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

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