TrainingsCubit class

A tela inicial dos treinos. Lê o progresso de todos os treinos ao abrir e de novo depois de cada treino (a tela chama load).

Inheritance

Constructors

TrainingsCubit({required SightReadingStore store, required bool hasMusic, required AppBusy busy, MusicInviteStore? invite})

Properties

busy → AppBusy
O trabalho do app (CT02/CT09): a leitura do progresso conta nele, para o roteiro de capturas não andar o relógio enquanto ela não chega.
final
hashCode → int
The hash code for this object.
no setterinherited
hasMusic → bool
Se a tela tem o music dos treinos. Sem ele, não há cartão da música e o convite não aparece.
final
isClosed → bool
Whether the bloc is closed.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → TrainingsState
The current state.
no setterinherited
store → SightReadingStore
Onde o progresso dos treinos é lido e gravado.
final
stream → Stream<TrainingsState>
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
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.
inherited
dismissInvite() → Future<void>
"Agora não" (ou "Experimentar"): esconde o convite e grava, para ele não voltar.
emit(TrainingsState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
load() → Future<void>
Lê o progresso de todos os treinos, o último aberto e se o convite aparece.
markLast(SightTrack track) → void
Marca track como o último aberto: o cartão "Continuar" e a gravação não esperam uma pela outra.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<TrainingsState> 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
toString() → String
A string representation of this object.
inherited

Operators

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