load method
Renderiza round e monta o treino, sem começar a tocar. widthPx é a
largura da caixa da partitura em pixels do dispositivo e heightPx a
altura, na mesma medida: a música que não cabe nela segue em outras
páginas (lessonScoreLayout).
Implementation
Future<void> load(
ScoreRound round, {
double widthPx = kDefaultPaperWidthPx,
double? heightPx,
Map<String, Object?>? layoutOverrides,
}) async {
_release();
final document = await _renderRound(
round,
widthPx,
heightPx,
layoutOverrides,
);
if (_disposed) return;
final timeline = ScoreTimeline(document);
if (timeline.measures.isEmpty) {
throw StateError('a partitura da rodada não tem compassos');
}
_mount(document, timeline, _withAppNotes(round, document));
}