AudioMessage.from constructor
AudioMessage.from({})
To create a new AudioMessage from path
or binaryData
or url
.
path
is for the local path of the local audio file.
binaryData
is for the binary data of the local audio file.
url
is for the URL of the remote audio file.
format
is for the FileMessage.format, it is optional.
name
is optional, if provide, the FileMessage.url will has a name
suffix.
Important:
You must provide only one of parameters in path
, binaryData
and url
.
Implementation
AudioMessage.from({
String? path,
Uint8List? binaryData,
String? url,
String? format,
String? name,
}) : super.from(
path: path,
binaryData: binaryData,
url: url,
format: format,
name: name,
);