MemoryCourseProgressCubit class

Progresso só em memória: rascunho (I12, que não guarda nada) e testes. Nada chega ao shared_preferences.

Inheritance

Constructors

MemoryCourseProgressCubit()

Properties

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 → CourseProgressState
The current state.
no setterinherited
stream → Stream<CourseProgressState>
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
emit(CourseProgressState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
ensureLoaded(String courseId) → Future<CourseProgress>
Garante o curso na memória (uma chave só). Emite para a lista e a tela do curso mostrarem o progresso guardado ao abrir.
inherited
keyProgressOf(String courseId, String exerciseId) → Future<Map<String, KeyRecord>>
O progresso por tom de exerciseId no curso courseId (EX05); vazio se nunca se tocou em tom nenhum ou se o armazenamento não responde.
inherited
markLessonDone(String courseId, String lessonId) → Future<void>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<CourseProgressState> 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
recordAttempt(String courseId, ExerciseSpec spec, RoundResult result, DateTime agora) → Future<void>
Registra a rodada de spec no dia agora (o relógio de quem a termina).
inherited
recordKeyRound(String courseId, String exerciseId, RoundResult result, DateTime at) → Future<void>
Grava uma rodada transposta (EX05): o tom (RoundResult.key, "Sol maior"), a porcentagem e a hora at. O mapa do exercício guarda, por tom, a melhor porcentagem e a última tentativa (Pike 25). Nada lê isso ainda; é a base do treino do dia. Rodada sem tom não grava nada; se não der para gravar, a rodada segue.
inherited
renotificar() → void
Emite um estado novo mesmo sem mudança de progresso (sobe o serial). Só quem junta o progresso de outros caches usa (o rascunho na lista).
inherited
setTempo(String courseId, String exerciseId, int bpm) → Future<void>
Grava o andamento da próxima rodada da escada (EX22). Se não der para gravar, a rodada segue e a escada volta ao começo na próxima vez.
inherited
tempoOf(String courseId, String exerciseId) → Future<int?>
O andamento em que a escada de exerciseId está agora (bpm), ou null se nunca se tocou ou o armazenamento não responde (a escada começa no from). Guardado à parte do ExerciseRecord, como o progresso por tom (EX22).
inherited
toString() → String
A string representation of this object.
inherited
touchLesson(String courseId, String lessonId) → Future<void>
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String courseId) → CourseProgress
inherited