ExerciseVisit class

Uma entrada num exercício de treino. Conta o tempo na tela (sem o tempo com o app em segundo plano) e o tempo tocando, e põe os dois no log (o ExerciseTimeCubit do aprendizado, ou o progresso da rotina do aluno): ao entrar, a cada flushEvery e ao sair. Cada gravação chama onSaved, que tenta enviar (sem esperar nada).

Constructors

ExerciseVisit({required ExerciseTimeLog log, required TrainingSession sessao, required Stream<PlayedNote> notes, required AppClock clock, required void onSaved(), required void onEnd(ExerciseVisit), Duration flushEvery = const Duration(seconds: 60)})

Properties

clock → AppClock
O relógio do app: os segundos da tela e o aviso que grava a cada flushEvery.
final
flushEvery → Duration
final
hashCode → int
The hash code for this object.
no setterinherited
log → ExerciseTimeLog
final
onEnd → void Function(ExerciseVisit)
final
onSaved → void Function()
final
playingSeconds → double
Segundos tocando (ver PlayingTimeMeter).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screenSeconds → double
Segundos na tela, sem o tempo em segundo plano.
no setter
sessao → TrainingSession
final

Methods

end() → void
A saída do exercício: grava os totais e para de escutar o teclado.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
O app foi para o segundo plano: o tempo para de contar.
resume() → void
O app voltou à frente.
toString() → String
A string representation of this object.
inherited

Operators

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