create static method

PushMessageContentPhoto create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "pushMessageContentPhoto",
  3. String special_return_type = "pushMessageContent",
  4. Photo? photo,
  5. String? caption,
  6. bool? is_secret,
  7. bool? is_pinned,
})
override

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

Implementation

static PushMessageContentPhoto create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "pushMessageContentPhoto",
  String special_return_type = "pushMessageContent",
  Photo? photo,
  String? caption,
  bool? is_secret,
  bool? is_pinned,
}) {
  // PushMessageContentPhoto pushMessageContentPhoto = PushMessageContentPhoto({
  final Map pushMessageContentPhoto_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "photo": (photo != null) ? photo.toJson() : null,
    "caption": caption,
    "is_secret": is_secret,
    "is_pinned": is_pinned,
  };

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

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