create static method

WebApp create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "webApp",
  3. String special_return_type = "webApp",
  4. String? short_name,
  5. String? title,
  6. String? description,
  7. Photo? photo,
  8. Animation? animation,
})
override

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

Implementation

static WebApp create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "webApp",
  String special_return_type = "webApp",
  String? short_name,
  String? title,
  String? description,
  Photo? photo,
  Animation? animation,
}) {
  // WebApp webApp = WebApp({
  final Map webApp_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "short_name": short_name,
    "title": title,
    "description": description,
    "photo": (photo != null) ? photo.toJson() : null,
    "animation": (animation != null) ? animation.toJson() : null,
  };

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

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