ScoreMarkCubit class

A renderização e o som de uma marca zywny-score. renderer é o falso dos testes (ou null, o Verovio real); afterFrame agenda a liberação da partitura antiga para depois do quadro (o ScoreView a segura até lá).

Inheritance

Constructors

ScoreMarkCubit({required ScoreMark mark, required CourseFiles files, required AppClock clock, ScoreRenderer? renderer, AfterFrame afterFrame = afterNextFrame})

Properties

afterFrame → AfterFrame
final
clock → AppClock
O relógio do app (CT05b): o agendador do toque da partitura o recebe.
final
controller ↔ ScoreCubit?
getter/setter pair
document ↔ VsbDocument?
O que a partitura desenhada usa (fica null até desenhar).
getter/setter pair
files → CourseFiles
final
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether the bloc is closed.
no setterinherited
mark → ScoreMark
final
renderer → ScoreRenderer?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → ScoreMarkState
The current state.
no setterinherited
stream → Stream<ScoreMarkState>
The current stream of states.
no setterinherited
viewController ↔ ScoreViewCubit?
getter/setter pair

Methods

addError(Object error, [StackTrace? stackTrace]) → void
Reports an error which triggers onError with an optional StackTrace.
inherited
close() → Future<void>
Closes the instance. This method should be called when the instance is no longer needed. Once close is called, the instance can no longer be used.
override
emit(ScoreMarkState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<ScoreMarkState> change) → void
Called whenever a change occurs with the given change. A change occurs when a new state is emitted. onChange is called before the state of the cubit is updated. onChange is a great spot to add logging/analytics for a specific cubit.
inherited
onError(Object error, StackTrace stackTrace) → void
Called whenever an error occurs and notifies BlocObserver.onError.
inherited
renderizar(double widthPx, Color highlight) → Future<void>
Pede a partitura na widthPx (a largura do papel) com a cor highlight. Outra largura refaz o desenho, e a partitura anterior segue à vista até a nova ficar pronta (o "carregando" só aparece na primeira vez). Outra cor só pinta de novo a que está. Uma falha vira error.
toggle(SoundEngine engine) → Future<void>
O toque da partitura: liga o som (no engine de agora) ou para. Sem partitura pronta, não faz nada.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited