ComentariosDaSemanaCubit class

Inheritance

Constructors

ComentariosDaSemanaCubit({required RotinaRemote remote, required PapelNaRotina eu, required String alunoUid, required String? profUid, required DateTime inicio, required AppClock clock})

Properties

alunoUid → String
O aluno do par (o uid dele, mesmo quando quem usa é o professor).
final
clock → AppClock
O relógio do app: a hora de um comentário que chega antes da do servidor.
final
eu → PapelNaRotina
De que lado da conversa o aparelho escreve.
final
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether the bloc is closed.
no setterinherited
remote → RotinaRemote
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → ComentariosDaSemanaState
The current state.
no setterinherited
stream → Stream<ComentariosDaSemanaState>
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
apagar(String id) → void
Apaga um comentário seu. A tela pede a confirmação antes.
cancelarEdicao() → void
Fecha a edição sem gravar.
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
comecarEdicao(String id) → void
Abre a edição de um comentário seu (a tela põe o texto no campo).
editar({required String id, required String texto}) → void
Grava o texto novo do comentário id (só o seu). A edição volta a não lida.
emit(ComentariosDaSemanaState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
escrever({required DateTime dia, String? item, required String texto}) → void
Escreve um comentário do lado de eu no dia (e no item, se for de um item). O texto é conferido antes (vazio ou longo demais vira aviso, sem gravar).
lerConversa({required DateTime dia, String? item}) → void
Abre a conversa de dia (e item): o que o outro lado escreveu nela fica lido. A tela chama antes de abrir a conversa.
mudar({required String? profUid, required DateTime dia}) → void
Passa a ver outra semana ou outro professor. Sem mudança, não faz nada.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<ComentariosDaSemanaState> 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