ChartRoundCubit class
A tela de uma rodada da grade: ouve o executor e guarda o que pintar.
- Inheritance
-
- Object
- BlocBase<
ChartRoundState> - Cubit<
ChartRoundState> - ChartRoundCubit
Constructors
- ChartRoundCubit({required TimedRound round, required TimedRoundRunner runner})
Properties
- cursor → ChartCursorCubit
-
O cursor da grade (
ChartView): o compasso e o tempo dentro dele.final -
form
→ List<
ChartSlot> -
Os acordes da forma (uma volta), para pintar cada um pelo acerto. Vazia sem
grade (a rodada de partitura).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the bloc is closed.
no setterinherited
-
revealBytes
→ List<
Uint8List> -
A frase certa de cada
echo(EX14), em bytes, pelo índice da frase: a mesmaUint8Listreaproveita a partitura da revelação. Vazia nas outras rodadas.final - round → TimedRound
-
final
- runner → TimedRoundRunner
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → ChartRoundState
-
The current state.
no setterinherited
-
stream
→ Stream<
ChartRoundState> -
The current stream of states.
no setterinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
Reports an
errorwhich triggers onError with an optional StackTrace.inherited -
alternarBase(
) → void - Liga ou desliga a base na hora (EX12), como o metrônomo.
-
alternarPausa(
) → void - "Pausar" e "Continuar": pausa ou volta o executor, e redesenha os controles.
-
close(
) → Future< void> -
Para de ouvir o executor e fecha o cursor. O
super.close()vem antes das esperas: a partir dele,isClosedjá vale e nenhumemitchega.override -
comecar(
) → void -
O aluno apertou "Tocar". Quem começa a rodada é o
onPlayda tela. -
emit(
ChartRoundState state) → void -
Updates the
stateto the providedstate. emit does nothing if thestatebeing emitted is equal to the currentstate.inherited -
mudarVolumeBase(
double volume) → void - O volume da base (EX12), de 0 a 100.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onChange(
Change< ChartRoundState> 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 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited