setYear method
Implementation
void setYear(String? year) {
if (year != null) {
for (final comment in _comments) {
if (comment.name == 'DATE') {
comment.data = utf8.encode(year);
return;
}
if (comment.name == 'YEAR') {
comment.data = utf8.encode(year);
return;
}
}
_comments.add(VorbisComment('DATE', utf8.encode(year)));
} else {
for (final comment in _comments) {
if (comment.name == 'DATE') {
_comments.remove(comment);
return;
}
if (comment.name == 'YEAR') {
_comments.remove(comment);
return;
}
}
}
}