create static method
VoiceNote
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "voiceNote",
- String special_return_type = "voiceNote",
- num? duration,
- String? waveform,
- String? mime_type,
- SpeechRecognitionResult? speech_recognition_result,
- File? voice,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static VoiceNote create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "voiceNote",
String special_return_type = "voiceNote",
num? duration,
String? waveform,
String? mime_type,
SpeechRecognitionResult? speech_recognition_result,
File? voice,
}) {
// VoiceNote voiceNote = VoiceNote({
final Map voiceNote_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"duration": duration,
"waveform": waveform,
"mime_type": mime_type,
"speech_recognition_result": (speech_recognition_result != null) ? speech_recognition_result.toJson() : null,
"voice": (voice != null) ? voice.toJson() : null,
};
voiceNote_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (voiceNote_data_create_json.containsKey(key) == false) {
voiceNote_data_create_json[key] = value;
}
});
}
return VoiceNote(voiceNote_data_create_json);
}