setTitle method

void setTitle(
  1. String? title
)

Implementation

void setTitle(String? title) {
  if (title != null) {
    for (final comment in _comments) {
      if (comment.name == 'TITLE') {
        comment.data = utf8.encode(title);
        return;
      }
    }
    _comments.add(VorbisComment('TITLE', utf8.encode(title)));
  } else {
    for (final comment in _comments) {
      if (comment.name == 'TITLE') {
        _comments.remove(comment);
        return;
      }
    }
  }
}