flush method

Future<void> flush(
  1. [FutureOr onFlush(
    1. List

Schedule a flush instruction to happen after current task buffer clears.

An optional callback onFlush may be provided and the queue only gets emptied if onFlush does not return false. It holds priority over the also optional onFlush defined at construction time.


Future<void> flush([FutureOr Function(List) onFlush]) =>
    _defer(() => _flush(onFlush));