FLUTTER ECOSYSTEM

paurakhsharma/flutter_chord

Flutter用の歌詞とコードパーサー

flutter_chord のプロジェクト画像
Stars
31
Forks
14
最終プッシュ(UTC)
2026/07/09
プロジェクト状態
公開中
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,
);