m3u 1.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 78

M3U format parser #

Simple parser for M3U and M3U_Plus files.

How to use #

Currently the parser only supports full file parsing.

import 'package:m3u/m3u.dart';

main() async {
  String playlistContent = <load_playlist>;
  final playlist = await M3uParser.parse(file);
  // Organized categories
  final categories =
      sortedCategories(entries: listOfTracks, attributeName: 'group-title');

Missing features #

  • [ ] Parse from a stream of data instead of a string
  • [ ] Parse the number next to the EXTINF Ex: #EXTINF:-1
  • [ ] Parse info from the header
  • [ ] Parse start track info
  • [ ] Parse non string information ex: aspect-ratio=4:3

1.0.2 - Sort tracks by an attribute #

  • Added an Helper to sort tracks by a specific attribute.

1.0.1 - Release version #

  • Added example to project.

1.0.0 - Release version #

  • Refactored the project to have it Dart appropriate
  • Changed the main import file

0.0.2 - First bug fix #

  • Removed meta as a main dependency.

0.0.1 - Initial version #

  • Support for basic M3U and M3U_Plus files


import 'dart:io';

import 'package:m3u/m3u.dart';

Future<void> main(List<String> arguments) async {
  final fileContent = await File('resources/example.m3u').readAsString();
  final List<M3uGenericEntry> listOfTracks = await parseFile(fileContent);

  // Organized categories
  final categories =
      sortedCategories(entries: listOfTracks, attributeName: 'group-title');

Use this package as a library

1. Depend on it

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

  m3u: ^1.0.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:m3u/m3u.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 Oct 24, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21


Detected platforms: Flutter, web, other

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


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
meta ^1.1.5 1.1.7
Dev dependencies
test ^1.3.0