chartOf function
- ChartMark mark
A grade da marca, ou null se o texto não lê (o leitor já deu o erro).
Implementation
ChordChart? chartOf(ChartMark mark) {
final key = KeySpec.parse(mark.key);
if (key == null) return null;
final progression = mark.progression;
if (progression != null) {
return ChordChart.fromProgression(
progression,
key: key,
time: mark.time,
bars: mark.bars,
);
}
return ChordChart.parse(mark.chart!, key: key, time: mark.time);
}