create static method

InputMessageVoiceNote create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "inputMessageVoiceNote",
  3. String special_return_type = "inputMessageContent",
  4. InputFile? voice_note,
  5. num? duration,
  6. String? waveform,
  7. FormattedText? caption,
  8. MessageSelfDestructType? self_destruct_type,
})
override

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

Implementation

static InputMessageVoiceNote create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "inputMessageVoiceNote",
  String special_return_type = "inputMessageContent",
  InputFile? voice_note,
  num? duration,
  String? waveform,
  FormattedText? caption,
  MessageSelfDestructType? self_destruct_type,
}) {
  // InputMessageVoiceNote inputMessageVoiceNote = InputMessageVoiceNote({
  final Map inputMessageVoiceNote_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "voice_note": (voice_note != null) ? voice_note.toJson() : null,
    "duration": duration,
    "waveform": waveform,
    "caption": (caption != null) ? caption.toJson() : null,
    "self_destruct_type": (self_destruct_type != null) ? self_destruct_type.toJson() : null,
  };

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

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