You can write the ID3 tags from a Map.
To reset a field, pass an empty string ("").
If the value is null, the field will be ignored and it will not be written.
voidsetTagsFromMap() async {
final path = "storage/emulated/0/Music/test.mp3";
final tags = <String, String>{
"title": "Title of the song",
"artist": "A fake artist",
"album": "", //This field will be reset"genre": null, //This field will not be written
};
final result = await tagger.writeTagsFromMap(
path: path,
tags: tags
);
}
You can write the ID3 tags from a Tag object.
To reset a field, pass an empty string ("").
If the value is null, the field will be ignored and it will not be written.
voidsetTags() async {
final path = "storage/emulated/0/Music/test.mp3";
final tag = Tag(
title: "Title of the song",
artist: "A fake artist",
album: "", //This field will be reset
genre: null, //This field will not be written
);
final result = await tagger.writeTags(
path: path,
tag: tag,
);
}
You can write a single tag field by specifying the field name.
To reset the field, pass an empty string ("").
If the value is null, the field will be ignored and it will not be written. \
voidsetTags() async {
final path = "storage/emulated/0/Music/test.mp3";
final result = await tagger.writeTag(
path: path,
tagField: "title",
value: "Title of the song"
);
}
This library is developed and maintained by Nicolò Rebaioli
:globe_with_meridians: My website
:mailbox: [niko.reba@gmail.com](mailto:niko.reba@gmail.com)