FLUTTER ECOSYSTEM

paurakhsharma/flutter_chord

適用於 Flutter 的歌詞和弦解析器

flutter_chord 專案封面
Stars
31
Forks
14
最近推送(UTC)
2026年7月9日
專案狀態
未封存
Paurakh Sharma Humagain GitHub avatar
GITHUB User

Paurakh Sharma Humagain ↗

Fullstack Developer. Instructs computers to do cool stuffs. (Python || JavaScript || Flutter) == ♥️

OneSheepNepal
語言DartHTMLSwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 3 項
  • flutter{"sdk":"flutter"}
  • flutter_test開發依賴{"sdk":"flutter"}
  • mockito開發依賴^5.0.17

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

flutter_chord

Test

Chord parser for Flutter apps.

Features

  • Transpose Chord
  • Auto Scroll

https://raw.githubusercontent.com/paurakhsharma/flutter_chord/main/screenshot.png

Usage

1) Render the Lyrics and Chords directly.

final textStyle = TextStyle(fontSize: 18, color: Colors.white);
final chordStyle = TextStyle(fontSize: 20, color: Colors.green);

final lyrics = '''
[C]Give me Freedom, [F]Give me fire
[Am] Give me reason, [G]Take me higher
''';

@override
  Widget build(BuildContext context) {
    return LyricsRenderer(
    lyrics: _lyrics,
    textStyle: textStyle,
    chordStyle: chordStyle,
    widgetPadding: 50,
    onTapChord: (String chord) {
      print('pressed chord: $chord');
    },
    transposeIncrement: 0,
    scrollSpeed: 0,
  );
}

2. Get a parsed ChordLyricsDocument and style it as you like.


final textStyle = TextStyle(fontSize: 18, color: Colors.white);
final chordStyle = TextStyle(fontSize: 20, color: Colors.green);

final lyrics = '''
[C]Give me Freedom , [F]Give me fire
[Am] Give me reason , [G]Take me higher
''';

ChordProcessor _chordProcessor = ChordProcessor(context);
ChordLyricsDocument chordLyricsDocument = _chordProcessor.processText(
  text: lyrics,
  lyricsStyle: textStyle,
  chordStyle: chordStyle,
  transposeIncrement: 0,
);