CourseDraftCubit class

Uma pasta aberta como rascunho: o último readCourse mais o progresso da sessão (que o Recarregar mantém) e a lição selecionada (idem, se ela ainda existir).

Inheritance

Constructors

CourseDraftCubit({required Future<CourseFiles> loadFiles(), MemoryCourseProgressCubit? progress})

Properties

course → Course?
no setter
errors → List<CourseIssue>
no setter
files → CourseFiles?
no setter
hasErrors → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
isClosed → bool
Whether the bloc is closed.
no setterinherited
issues → List<CourseIssue>
no setter
label → String
Nome para a faixa ("Rascunho · não verificado ·
no setter
lessonId → String?
A lição aberta (para o Recarregar manter a tela, se ela ainda existir).
no setter
loaded → LoadedCourse?
O curso pronto para as telas do I09, com origin: draft. null com erro (aí vale a lista de problemas).
no setter
loading → bool
no setter
progress → MemoryCourseProgressCubit
Progresso da sessão: o mesmo objeto do primeiro ao último Recarregar.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
state → CourseDraftState
The current state.
no setterinherited
stream → Stream<CourseDraftState>
The current stream of states.
no setterinherited
warnings → List<CourseIssue>
no setter

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(CourseDraftState state) → void
Updates the state to the provided state. emit does nothing if the state being emitted is equal to the current state.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onChange(Change<CourseDraftState> 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
reload() → Future<void>
Lê de novo e atualiza: o progresso da sessão fica, a lição fica se ela ainda existir no curso novo (senão volta para null, a lista).
selectLesson(String? id) → void
A lição que a tela mostra (a selecionada, se ainda existir). null volta para a lista, por isso o estado é montado inteiro (o copyWith não limpa).
toString() → String
A string representation of this object.
inherited

Operators

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