create static method

OpenWebApp create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "openWebApp",
  3. String special_return_type = "webAppInfo",
  4. bool? is_tdlib_method,
  5. num? chat_id,
  6. num? bot_user_id,
  7. String? url,
  8. num? message_thread_id,
  9. InputMessageReplyTo? reply_to,
  10. WebAppOpenParameters? parameters,
})
override

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

Implementation

static OpenWebApp create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "openWebApp",
  String special_return_type = "webAppInfo",
  bool? is_tdlib_method,
  num? chat_id,
  num? bot_user_id,
  String? url,
  num? message_thread_id,
  InputMessageReplyTo? reply_to,
  WebAppOpenParameters? parameters,
}) {
  // OpenWebApp openWebApp = OpenWebApp({
  final Map openWebApp_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "chat_id": chat_id,
    "bot_user_id": bot_user_id,
    "url": url,
    "message_thread_id": message_thread_id,
    "reply_to": (reply_to != null) ? reply_to.toJson() : null,
    "parameters": (parameters != null) ? parameters.toJson() : null,
  };

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

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