enqueueTask method
void
enqueueTask(
- void task()
Adds the given task
to the queue.
Implementation
void enqueueTask(final void Function() task) {
final currentTaskIdentity = Object();
_latestTaskIdentity = currentTaskIdentity;
scheduleMicrotask(() {
if (_latestTaskIdentity == currentTaskIdentity) task();
});
}