dart_tags 0.2.0

Dart Tags #

pub package Build Status

The library for parsing ID3 tags, written in pure Dart.

You can found sample app written with flutter framework here.

License #

project under MIT license

Changelogs #

full changelog

0.2.0 #

  • added separate frame processing Framer API
  • update tests (added test for issue #4)
  • fixed empty tag exception for id3v1
  • added CoC
  • fixed writing APIC tag issue #3

0.1.2 (HotFix) #

  • rise limmit of tag according to the issue #3

Instalation #

add dependency in pubsec.yaml

  dart_tags: ^0.2.0

Usage #

A simple usage example:

import 'dart:io';

import 'package:dart_tags/dart_tags.dart';

main(List<String> args) {
  TagProcessor tp = new TagProcessor();

  File f = new File(args[0]);
  tp.getTagsFromByteArray(f.readAsBytes()).then((l) => l.forEach((f) => print(f)));

Code of conduct #

Please refer our code of conduct.

Features and bugs #

Please feel free for feature requests and bugs at the issue tracker.

In addition #

Thanx for the Photo by Mink Mingle on Unsplash that we using in unit tests.

0.0.1 #

  • Initial version
  • Supports Id3 v1.1 tags

0.0.2 #

  • Basic support of ID3 v2.4 tags
  • support main frames include APIC
  • TagProcessor now can get tags from file and from ByteData
  • You can select which type of tag do you want to get
  • Small fix in id3 v1 parser

0.0.3 #

  • Removed dependency from [dart:io]
  • Some API changes

0.0.4 #

  • Formating sources

0.0.5 #

  • Update static analyzer rules
  • API Changes: AttachedPicture.imageType now returns String value .imageTypeCode return byte value

0.0.6 #

  • Fixed compile-time issue

0.0.7 #

  • Removed assertion in parser
  • Fixed some crashes.
  • Added clearing from null bytes in id3v2 and unsync bytes
  • UTF16 crash fixed
  • Improve stability

0.0.8 #

  • added BASE64 for imageData in attached pictures
  • small changes in example
  • fix README formating

0.0.9 #

  • added ParsingException class
  • up sdk dependency in pubsec.yaml to <=3.0.0
  • wrote some tests
  • added stub mp3s for tests

0.1.0 #

  • added writers (currently v2 writer not fully implemented)
  • fixed custom tags (TXXX / WXXX) reading
  • wrote some rough tests for writers

0.1.1 #

  • added writer for custom tags (TXXX)
  • added writer for attached picture (APIC tagged frame)
  • update tests for TXXX and APIC writers

0.1.2 (HotFix) #

  • rise limmit of tag according to the issue #3

0.2.0 #

  • added separate frame processing Framer API
  • update tests (added test for issue #4)
  • fixed empty tag exception for id3v1
  • added CoC
  • fixed writing APIC tag issue #3


import 'dart:io';

import 'package:dart_tags/dart_tags.dart';

void main(List<String> args) {
  if (args.isNotEmpty) {
  } else {
    print('args please!');

void _proceedArg(String path) {
  final fileType = FileStat.statSync(path).type;
  switch (fileType) {
    case FileSystemEntityType.directory:
          .list(recursive: true, followLinks: false)
          .listen((FileSystemEntity entity) {
        if (entity.statSync().type == FileSystemEntityType.file &&
            entity.path.endsWith('.mp3')) {
    case FileSystemEntityType.file:
      if (path.endsWith('.mp3')) {
    case FileSystemEntityType.notFound:
      print('file not found');
      print('sorry dude I don`t know what I must to do with that...\n');

void printFileInfo(String fileName) {
  final file = File(fileName);
  TagProcessor().getTagsFromByteArray(file.readAsBytes()).then((l) {
    print('FILE: $fileName');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dart_tags: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dart_tags/dart_tags.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Sep 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:dart_tags/dart_tags.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
Dev dependencies
pedantic ^1.8.0+1
test ^1.6.5