writeTag method
Method to write ID3 tags to MP3 file.
path
: The path of the file.
tagField
: The name of the field you want to change (refer to documentation for their name, section "Map of tags").
value
: Value of the field.
artwork
: The file path of the song artwork.
version
: The version of ID3 tag frame you want to write. By default set to ID3V2.
return
: true
if the operation has success, false
instead.
Implementation
Future<bool?> writeTag({
required String path,
required String tagField,
required String value,
}) async {
return await _channel.invokeMethod("writeTags", {
"path": path,
"tags": tagField != "artwork" ? <String, String>{tagField: value} : null,
"artwork": tagField == "artwork" ? value : null,
});
}