create static method
MessageAudio
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "messageAudio",
- String special_return_type = "messageContent",
- Audio? audio,
- FormattedText? caption,
override
Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual
Implementation
static MessageAudio create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "messageAudio",
String special_return_type = "messageContent",
Audio? audio,
FormattedText? caption,
}) {
// MessageAudio messageAudio = MessageAudio({
final Map messageAudio_data_create_json = {
"@type": special_type,
"@return_type": special_return_type,
"audio": (audio != null) ? audio.toJson() : null,
"caption": (caption != null) ? caption.toJson() : null,
};
messageAudio_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (messageAudio_data_create_json.containsKey(key) == false) {
messageAudio_data_create_json[key] = value;
}
});
}
return MessageAudio(messageAudio_data_create_json);
}