RotinaDoAlunoCubit class

Inheritance

Constructors

RotinaDoAlunoCubit({required RotinaRemote remote, required String profUid, required String alunoUid, required AppClock clock, Duration esperaMaxima = const Duration(seconds: 20)})

Properties

alunoUid → String
O aluno da rotina.
final
clock → AppClock
final
esperaMaxima → Duration
Quanto o servidor pode demorar antes de a tela dizer que não há conexão.
final
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether the bloc is closed.
no setterinherited
profUid → String
O professor que grava a rotina.
final
remote → RotinaRemote
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → RotinaDoAlunoState
The current state.
no setterinherited
stream → Stream<RotinaDoAlunoState>
The current stream of states.
no setterinherited

Methods

acrescentarItem(RotinaItem item) → void
Acrescenta item ao dia selecionado. Se o id já está no dia, põe um id novo.
addError(Object error, [StackTrace? stackTrace]) → void
Reports an error which triggers onError with an optional StackTrace.
inherited
atualizarItem(RotinaItem item) → void
Troca o item de mesmo id no dia selecionado por item.
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(RotinaDoAlunoState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
escolherDia(DateTime dia) → void
Mostra o dia dia. Troca de dia esquece o escopo escolhido.
escolherEscopo(EscopoDaMudanca escopo) → void
O escopo das mudanças do dia selecionado: "Só neste dia" ou "Deste dia em diante".
gravar() → Future<void>
Grava o rascunho. Com problemas, não grava: a tela mostra a lista.
irParaSemana(int semanas) → void
Vai para a semana semanas à frente (negativo, para trás).
moverItem(String id, int quanto) → void
Sobe (-1) ou desce (+1) o item id no dia selecionado.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<RotinaDoAlunoState> 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
removerItem(String id) → void
Tira o item id do dia selecionado. Um dia que fica sem itens vira folga (a exceção vazia do dia): o dia não some da rotina, e o aluno o vê sem nada.
toString() → String
A string representation of this object.
inherited
voltarAoPadrao() → void
Tira a exceção do dia selecionado: o dia volta a seguir a rotina de todos os dias.

Operators

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