RecordTaskEventsMixin<T> mixin

A special type of Manager that records events of onEventCallback and allows accessing them through getRecordedEvent

Superclass constraints
  1. @Deprecated('Starting from 0.4.0, Manager class supports the following methods of the mixin be default')

Properties

eventSnapshotTable Map<String, TaskEvent<T>>
no setterinherited
eventTable Map<String, TaskEvent<T>>
no setter
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
If dispose was called on the manager
no setterinherited
onUpdated Stream<void>
Emits an event each time on or onStateChanged fires an event.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → T
Current state of the manager.
no setterinherited

Methods

deleteRecordEvent({required String taskId}) → void
Deletes an reference of the event of the taskId from the _eventTable map
dispose() → void
Closing all the sinks of manager.
inherited
getAsyncReferenceOf({required String taskId}) AsyncTaskCompleterReference<T>?
Gives a reference for the AsynchronousTask tracked by the manager by taskId.
inherited
getEventSnapshot({required String taskId}) TaskEvent<T>?
All events coming from onEventCallback are recorded in the _eventSnapshotTable map and can be accessed by this method using taskId.
inherited
getRecordedEvent({required String taskId}) TaskEvent<T>?
All events coming from onEventCallback are recorded in the _eventTable map and can be accessed by this method using taskId.
kill(CancelableAsyncTaskMixin<T> task) Future<void>
inherited
killById({required String taskId}) Future<void>
Deletes a reference of the event of the taskId from the _eventTable map before the task of taskId is killed
override
mutateState(T newState) → void
This method changes the _state and adds events to onStateChanged
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<S extends Task<T>>({String? taskId, bool withLatest = false}) Stream<TaskEvent<T>>
Emits TaskEvent while tracking the Tasks
inherited
onEventCallback(TaskEvent<T> event) → void
Records the event into the _eventTable
override
onStateChanged({bool withLatest = false}) Stream<T>
Emits an event each time the state is changed in mutateState
inherited
recordEvent(TaskEvent<T> event) → void
Saves the event into _eventTable map
recordEventSnapshot(TaskEvent<T> event) → void
Saves the event into _eventSnapshotTable map
inherited
run(Task<T> task) → void
  • If the manager runs a SynchronousTask - only TaskSuccessEvent will be added to the on stream.
  • If the manager runs an AsynchronousTask - the events will be added to the on stream depending on following cases:
  • inherited
    safelyExtractTaskIdFromString(String taskId) String
    Encapsulated method to form the taskId to get a reference of tasks properly
    inherited
    safelyGetTaskIdFromTask(Task<T> task) String
    Encapsulated method to form the id of Task to get a reference properly
    inherited
    testAsyncTaskIdPivotGeneratorRaw(String taskId) String
    inherited
    toString() String
    A string representation of this object.
    inherited
    waitForTaskToBeDone({required String taskId}) Future<void>
    inherited

    Operators

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