id3 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 66

id3 #

A cross platform dart package to extract meta data from mp3 files.

This package contains functions that could extract meta tags from mp3 files that uses ID3 tag version 2.3.0 and ID3 tag version 1 to store meta data.

Usage #

import 'package:id3/id3.dart';

void main(){
  MP3Instance mp3instance = new MP3Instance("./file.mp3");

  /// parseTags() returns 
  // 'true' if successfully parsed
  // 'false' if was unable to recognize tag so can't be parsed

  if(mp3instance.parseTagsSync()){
    print(mp3instance.getMetaTags());
  }
}

/// mp3instance.getMetaTags() returns Map<String, dynamic>
// {
//   "Title": "SongName",
//   "Artist": "ArtistName",
//   "Album": "AlbumName",
//   "APIC": {
//     "mime": "image/jpeg",
//     "textEncoding": "0",
//     "picType": "0",
//     "description": "description",
//     "base64": "AP/Y/+AAEEpGSUYAAQEBAE..."
//   }
// }

Support #

  • [ ] Support ID3v2.2

[0.1.3] - 2019-08-07

  • Renamed parseTagsSync to parseTagsSync

[0.1.1] - 2019-07-24

  • First public release with id3v1 and id3v2.3 support

[0.0.5] - 2019-07-19

  • Added id3v1 support

[0.0.4] - 2019-07-18

  • Initial Release

example/main.dart

import 'package:id3/id3.dart';

void main(){
  MP3Instance mp3instance = new MP3Instance("./file.mp3");
  if(mp3instance.parseTagsSync()){
    print(mp3instance.getMetaTags());
  }
}

// {
//   "Title": "SongName",
//   "Artist": "ArtistName",
//   "Album": "AlbumName",
//   "APIC": {
//     "mime": "image/jpeg",
//     "textEncoding": "0",
//     "picType": "0",
//     "description": "description",
//     "base64": "AP/Y/+AAEEpGSUYAAQEBAE..."
//   }
// }

Use this package as a library

1. Depend on it

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


dependencies:
  id3: ^0.1.3

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:id3/id3.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
32
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
66
Learn more about scoring.

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, other

Primary library: package:id3/id3.dart with components: io.

Health suggestions

Format lib/id3.dart.

Run dartfmt to format lib/id3.dart.

Format lib/src/const.dart.

Run dartfmt to format lib/src/const.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
Dev dependencies
test ^1.6.5