OuvirExecucaoCubit class

Inheritance

Constructors

OuvirExecucaoCubit({required RotinaRemote remote, required String profUid, required String alunoUid, required DateTime dia, required String itemId, required Future<SoundEngine?> ensureEngine(), required AppClock clock})
OuvirExecucaoCubit.deNotas({required ExecucaoDaRodada execucao, required Future<SoundEngine?> ensureEngine(), required AppClock clock})
A escuta de uma rodada já lida: as notas vêm no construtor e nada se lê do remoto.

Properties

clock → AppClock
O relógio do app (o fim da escuta e a tecla que soa).
final
ensureEngine → Future<SoundEngine?> Function()
O motor de som da saída escolhida; null sem som.
final
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether the bloc is closed.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → OuvirExecucaoState
The current state.
no setterinherited
stream → Stream<OuvirExecucaoState>
The current stream of states.
no setterinherited

Methods

addError(Object error, [StackTrace? stackTrace]) → void
Reports an error which triggers onError with an optional StackTrace.
inherited
carregar() → Future<void>
Lê a execução do item. Sem execução, a tela diz isso. A escuta de uma rodada já lida não lê nada: já tem as notas.
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(OuvirExecucaoState 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<OuvirExecucaoState> 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
parar() → void
Para a escuta: solta as teclas que soam e cancela o que faltava agendar.
tocar() → Future<void>
Toca a execução. Cada nota vai ao motor no seu tempo; a tecla que soa é publicada; o fim da rodada volta ao estado "pronta". Quem falhou por falta de som pode tentar de novo.
toString() → String
A string representation of this object.
inherited

Operators

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