create static method

GetMainWebApp create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "getMainWebApp",
  3. String special_return_type = "mainWebApp",
  4. bool? is_tdlib_method,
  5. num? chat_id,
  6. num? bot_user_id,
  7. String? start_parameter,
  8. WebAppOpenParameters? parameters,
})
override

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

Implementation

static GetMainWebApp create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "getMainWebApp",
  String special_return_type = "mainWebApp",
  bool? is_tdlib_method,
  num? chat_id,
  num? bot_user_id,
  String? start_parameter,
  WebAppOpenParameters? parameters,
}) {
  // GetMainWebApp getMainWebApp = GetMainWebApp({
  final Map getMainWebApp_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,
    "start_parameter": start_parameter,
    "parameters": (parameters != null) ? parameters.toJson() : null,
  };

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

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