lrc 1.0.1 copy "lrc: ^1.0.1" to clipboard
lrc: ^1.0.1 copied to clipboard

A Dart-only package that creates, parses, and handles LRC, which is a format that stores song lyrics.

example/example.dart

import 'package:lrc/lrc.dart';

void main() {
  ///String to be parsed
  var song = """
[ti:Never Gonna Give You Up]
[ar:Rick Astley]
[la:en]
[00:18.78]We're no strangers to love
[00:22.83]You know the rules and so do I
[00:27.11]A full commitment's what I'm thinking of
[00:31.25]You wouldn't get this from any other guy
""";

  ///Parse LRC
  var lrc = Lrc.parse(song);
  //Prints the formatted string. The output is mostly the same as the string to be parsed.
  print(lrc.format() + '\n');
  printLyrics(lrc);
}

///Prints the lyrics on their specified timestamp
void printLyrics(Lrc lrc) async {
  await for (LrcStream i in lrc.stream) {
    print('${i.current.lyrics}');
  }
}
17
likes
150
pub points
93%
popularity

Publisher

verified publisheryivan.rf.gd

A Dart-only package that creates, parses, and handles LRC, which is a format that stores song lyrics.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on lrc