initLyricList method

void initLyricList()

Implementation

void initLyricList() {
  lyricTextPaints.clear();
  subLyricTextPaints.clear();
  //歌词转画笔
  lyricTextPaints.addAll(lyrics
      .map((l) => TextPainter(
          text: TextSpan(text: l.lyric, style: lyricStyle),
          textDirection: TextDirection.ltr))
      .toList());

  //翻译/音译歌词转画笔
  if (remarkLyrics != null && remarkLyrics!.isNotEmpty) {
    subLyricTextPaints.addAll(remarkLyrics!
        .map((l) => TextPainter(
            text: TextSpan(text: l.lyric, style: remarkStyle),
            textDirection: TextDirection.ltr))
        .toList());
  }
}