addFn method
Adds a bare function as a deferred operation. Convenience shortcut for
add(WaiterOperation(fn, id: id)); behaves identically except the
caller does not have to construct the wrapper.
Implementation
void addFn(FutureOr<T> Function() fn, {String? id}) {
_operations.add(WaiterOperation<T>(fn, id: id));
}