chordPlayLayerDone function

bool chordPlayLayerDone(
  1. Set<String> done,
  2. ChordPlayLayer layer, {
  3. required int sections,
  4. required bool hasWhole,
})

A camada layer está feita: todos os seus itens. Uma música sem trecho não tem camada feita.

Implementation

bool chordPlayLayerDone(
  Set<String> done,
  ChordPlayLayer layer, {
  required int sections,
  required bool hasWhole,
}) {
  final items = chordPlayItemsOf(layer, sections: sections, hasWhole: hasWhole);
  return items.isNotEmpty && items.every((item) => done.contains(item.key));
}