Waiter<T> constructor

Waiter<T>({
  1. _TOnErrorCallback? onError,
  2. Iterable<WaiterOperation<T>> operations = const <Never>[],
})

Creates a waiter to queue and manage deferred operations.

The supplied operations iterable is fully materialised and copied into the internal queue at construction time, so post-construction mutation of the caller's collection has no effect on the waiter.

Implementation

Waiter({
  _TOnErrorCallback? onError,
  Iterable<WaiterOperation<T>> operations = const <Never>[],
})  : _onError = onError,
      _operations = List<WaiterOperation<T>>.of(operations);