create static method
Audio
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "audio",
- String? url,
- String? mimetype,
- String? filesha256,
- String? filelength,
- num? seconds,
- bool? ptt,
- String? mediakey,
- String? fileencsha256,
- String? directpath,
- String? mediakeytimestamp,
- ContextInfo? contextinfo,
- String? waveform,
override
Generated
Implementation
static Audio create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "audio",
String? url,
String? mimetype,
String? filesha256,
String? filelength,
num? seconds,
bool? ptt,
String? mediakey,
String? fileencsha256,
String? directpath,
String? mediakeytimestamp,
ContextInfo? contextinfo,
String? waveform,
}) {
// Audio audio = Audio({
final Map audio_data_create_json = {
"@type": special_type,
"url": url,
"mimetype": mimetype,
"fileSha256": filesha256,
"fileLength": filelength,
"seconds": seconds,
"ptt": ptt,
"mediaKey": mediakey,
"fileEncSha256": fileencsha256,
"directPath": directpath,
"mediaKeyTimestamp": mediakeytimestamp,
"contextInfo": (contextinfo != null) ? contextinfo.toJson() : null,
"waveform": waveform,
};
audio_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (audio_data_create_json.containsKey(key) == false) {
audio_data_create_json[key] = value;
}
});
}
return Audio(audio_data_create_json);
}