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
-
- Object
- BlocBase<
ScoreMarkState> - Cubit<
ScoreMarkState> - ScoreMarkCubit
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
nullaté 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
errorwhich 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
stateto the providedstate. emit does nothing if thestatebeing emitted is equal to the currentstate.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< ScoreMarkState> change) → void -
Called whenever a
changeoccurs with the givenchange. Achangeoccurs when a newstateis emitted. onChange is called before thestateof thecubitis updated. onChange is a great spot to add logging/analytics for a specificcubit.inherited -
onError(
Object error, StackTrace stackTrace) → void -
Called whenever an
erroroccurs and notifies BlocObserver.onError.inherited -
renderizar(
double widthPx, Color highlight) → Future< void> -
Pede a partitura na
widthPx(a largura do papel) com a corhighlight. 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 viraerror. -
toggle(
SoundEngine engine) → Future< void> -
O toque da partitura: liga o som (no
enginede 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