setEncoder method

void setEncoder(
  1. String? encoder
)

Implementation

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