create static method

InputChatPhoto create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inputChatPhoto",
  3. bool special_is_json_scheme_class = true,
  4. String special_return_type = "inputChatPhoto",
  5. InputChatPhotoPrevious? input_chat_photo_previous,
  6. InputChatPhotoStatic? input_chat_photo_static,
  7. InputChatPhotoAnimation? input_chat_photo_animation,
  8. InputChatPhotoSticker? input_chat_photo_sticker,
})
override

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

Implementation

static InputChatPhoto create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "inputChatPhoto",
  bool special_is_json_scheme_class = true,
  String special_return_type = "inputChatPhoto",
  InputChatPhotoPrevious? input_chat_photo_previous,
  InputChatPhotoStatic? input_chat_photo_static,
  InputChatPhotoAnimation? input_chat_photo_animation,
  InputChatPhotoSticker? input_chat_photo_sticker,
}) {
  // InputChatPhoto inputChatPhoto = InputChatPhoto({
  final Map inputChatPhoto_data_create_json = {
    "@type": special_type,
    "@is_json_scheme_class": special_is_json_scheme_class,
    "@return_type": special_return_type,
    "input_chat_photo_previous": (input_chat_photo_previous != null) ? input_chat_photo_previous.toJson() : null,
    "input_chat_photo_static": (input_chat_photo_static != null) ? input_chat_photo_static.toJson() : null,
    "input_chat_photo_animation": (input_chat_photo_animation != null) ? input_chat_photo_animation.toJson() : null,
    "input_chat_photo_sticker": (input_chat_photo_sticker != null) ? input_chat_photo_sticker.toJson() : null,
  };

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

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